# assertPermissions

`function` in `core` · v0.12.0

<https://seedcord.org/docs/packages/core/0.12.0/functions/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 with `inverse` 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(
    { subject, permissions, scope, inverse, notice },
    input: 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 with `inverse` 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.

- `{ subject, permissions, scope, inverse, notice }`
- `input` `PermissionAssertion`

Returns `void`.
