allowedCategory
suspend fun CheckContext<ChatInputCommandInteractionCreateEvent>.allowedCategory(allowed: List<Snowflake>, banned: List<Snowflake>)
Check ensuring that a command was sent within an allowed category, or not within a banned one.
Passes when:
Command doesn't happen in a channel
Command happens in a channel that can't be in a category (eg, DMs)
Command happens in an allowed category
If there are no allowed categories, command doesn't happen in a banned category
Fails when:
Command happens outside a category, when allowed categories are configured
If there are allowed categories, command doesn't happen in an allowed category
Command happens in a banned category
Parameters
allowed
List of allowed category IDs
banned
List of banned category IDs