-
-
Notifications
You must be signed in to change notification settings - Fork 469
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
Add Slash Command Permissions support. #280
Conversation
merge master into feature/slash
Merge bug fixes into feature/slash
@TheGamerX20 could you take a look at these suggestions? |
Hey, I am sorry for the wait, I did look at them and will commit them soon but I have been working on some changes according to feedback as outlined in Pycord's Discord server here: https://discord.com/channels/881207955029110855/881735314987708456/899998877598494850 work is done, just wanna make sure there are no bugs/issues before committing :) |
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Co-authored-by: BobDotCom <71356958+BobDotCom@users.noreply.github.com>
There are some merge conflicts here. They should be resolved by moving the file to discord/commands/commands.py. |
Fixed the Merge Conflicts. |
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.
Looks good, thanks
Slash command groups are missing permissions which causes |
Is there any way to use it like this? @slash.slash(name="cool_command") instead of the role i want to check if the user has a certain guildpermission |
Summary
This pull request adds support for Slash Command Permissions by using:
"has_role", 'has_any_role", "is_user" and "is_owner" from discord.app.commands.
Also adds an example "slash_perms.py" in "examples/app_commands/".
Fixes Issues (#93) and (#247)
Checklist