Skip to content

How the heck do i test if the bot has a certain permission in message event #2497

Answered by arqunis
MCorange99 asked this question in Q&A
Discussion options

You must be logged in to vote

The Member::permissions field is only Some when the Member instance is from an interaction, like a slash command or message component. In regular situations, you have to calculate the permissions the member has.

There are plenty of methods for doing that, so I recommend using the one that's most relevant to you:

  1. Permissions based on roles only:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MCorange99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question A question about Serenity. model Related to the `model` module.
2 participants