# checkBotPermissions

`function` in `gateway` · v0.1.0-next.3

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

Checks if the bot has required permissions in a Guild or TextChannel. Refuses when a required permission is missing.

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

Checks if the bot has required permissions in a Guild or TextChannel. Refuses when a required permission is missing.

Parameters.

- `target` `Guild | TextChannel` — Guild or text channel to check in
- `scope` `PermissionScope` — Permission bits to validate
- `inverse?` `boolean` — Whether to check for absence of the given permissions
- `errors?` `PermissionErrorNoticeOverrides` — Optional custom error constructors

Returns `void`.
