diff options
| author | Rapptz <[email protected]> | 2021-02-18 07:28:37 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-02-18 07:28:37 -0500 |
| commit | a8f44174bafed3989ec2959a62b89006f4a9e9a1 (patch) | |
| tree | 5f89edd97b2aa65695cfa5623bea47a328367561 | |
| parent | Add support for the new permission serialization scheme. (diff) | |
| download | discord.py-a8f44174bafed3989ec2959a62b89006f4a9e9a1.tar.xz discord.py-a8f44174bafed3989ec2959a62b89006f4a9e9a1.zip | |
Add Permissions.use_slash_commands
| -rw-r--r-- | discord/permissions.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/discord/permissions.py b/discord/permissions.py index 0a4e9438..68d2a496 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -403,9 +403,13 @@ class Permissions(BaseFlags): """:class:`bool`: Returns ``True`` if a user can create, edit, or delete emojis.""" return 1 << 30 - # 1 unused + @flag_value + def use_slash_commands(self): + """:class:`bool`: Returns ``True`` if a user can use slash commands. - # after these 32 bits, there's 21 more unused ones technically + .. versionadded:: 1.7 + """ + return 1 << 31 def augment_from_permissions(cls): cls.VALID_NAMES = set(Permissions.VALID_FLAGS) |