# assertPermissions

`function` in `core` · v0.7.0

<https://docs.seedcord.org/packages/core/0.7.0/assert-permissions>

Refuses when the subject is missing a permission in `scope`, or with `inverse` when it holds one. The Administrator bit passes any scope, and on the inverse arm it reports every bit in `scope`.

The caller computes `permissions`, gateway off a discord.js role, member, or channel, and HTTP off the bitfield the interaction payload carries.

```ts
assertPermissions(check: PermissionAssertion): void
```

Refuses when the subject is missing a permission in `scope`, or with `inverse` when it holds one. The Administrator bit passes any scope, and on the inverse arm it reports every bit in `scope`.

The caller computes `permissions`, gateway off a discord.js role, member, or channel, and HTTP off the bitfield the interaction payload carries.

Parameters.

- `check` `PermissionAssertion`

Returns `void`.
