# checkBotPermissions

`function` in `gateway` · v0.4.1

<https://docs.seedcord.org/packages/gateway/0.4.1/functions/check-bot-permissions>

Checks the bot's own permissions in a Guild or TextChannel. Refuses when a permission in `scope` is missing, or with `inverse` when one is present. When the bot member is uncached, the refusal reports every permission in `scope` as missing.

```ts
checkBotPermissions(
    target: Guild | TextChannel,
    scope: PermissionScope,
    inverse?: boolean,
    errors?: PermissionNoticeOverrides
): void
```

Checks the bot's own permissions in a Guild or TextChannel. Refuses when a permission in `scope` is missing, or with `inverse` when one is present. When the bot member is uncached, the refusal reports every permission in `scope` as missing.

Parameters.

- `target` `Guild | TextChannel`
- `scope` `PermissionScope`
- `inverse?` `boolean`
- `errors?` `PermissionNoticeOverrides`

Returns `void`.
