-
Notifications
You must be signed in to change notification settings - Fork 17
Added the default_member_permissions parameter to adding application commands #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added the default_member_permissions parameter to adding application commands #29
Conversation
jchristgit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the pull request!
Two small comments, apart from that it's good to merge 🙂
| @doc """ | ||
| An optional callback that returns a bitset for the required default permissions to run this command. | ||
| Example callback that requires that the user has the permission to ban members to be able to see and execute this command | ||
| ```elixir | ||
| def default_member_permissions, do: | ||
| Nostrum.Permission.to_bitset([:ban_members]) | ||
| ``` | ||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's dedent this by two spaces so it matches the rest of the module
| @doc """ | |
| An optional callback that returns a bitset for the required default permissions to run this command. | |
| Example callback that requires that the user has the permission to ban members to be able to see and execute this command | |
| ```elixir | |
| def default_member_permissions, do: | |
| Nostrum.Permission.to_bitset([:ban_members]) | |
| ``` | |
| """ | |
| @doc """ | |
| An optional callback that returns a bitset for the required default permissions to run this command. | |
| Example callback that requires that the user has the permission to ban members to be able to see and execute this command | |
| ```elixir | |
| def default_member_permissions, do: | |
| Nostrum.Permission.to_bitset([:ban_members]) |
"""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need a bit more time to do your recommended changes for personal reasons, but it's noted!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No rush 🙂 If I can help out let me know!
|
I think these doesn't really need to be any integration, since the other PR supports what I do anyway |
to string as perdiscord documentation
|
Thank you for the PR, and sorry for the long wait here. I applied it in master. Have a great weekend! |
Since changing specific application command permissions is impossible with regular bot tokens anyway, at least we can set the default required permissions to run a command on add.