Commit Graph

124 Commits

Author SHA1 Message Date
91281f23a0 Add Set Voice Channel Status permission 2025-08-24 19:59:10 -04:00
a5a4bcf61b Update Permissions.manage_messages docstring 2025-08-19 04:09:21 -04:00
ad48815926 Add Permissions.pin_messages 2025-08-19 04:04:09 -04:00
44a44e938f Reformat entire project with ruff instead of black 2025-08-18 20:16:10 -04:00
983a9b8f94 Use Unpack where it's possible 2025-08-15 05:36:36 -04:00
Dep
0ce11544e3 Add discord.Permissions.apps() 2025-06-20 14:25:47 -04:00
59f877fcf0 Fix and add test for missing discord.Permission bits 2024-09-02 10:53:31 -04:00
bb1d09a13f Account for user installations in Channel.permissions_for
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
2024-06-12 14:25:49 -04:00
895d6c37df Add Permissions.use_external_apps 2024-06-11 17:31:08 -04:00
e5ae306d1a Add more missing perms to permission classmethods 2024-05-10 11:08:06 -04:00
f851d9aa3f Add missing poll permissions to permission classmethods 2024-05-10 08:19:08 -04:00
e43bd8692c Add support for Polls
Co-authored-by: owocado <24418520+owocado@users.noreply.github.com>
Co-authored-by: Josh <8677174+bijij@users.noreply.github.com>
Co-authored-by: Trevor Flahardy <75498301+trevorflahardy@users.noreply.github.com>
2024-05-10 06:14:12 -04:00
2f71506169 Add view_creator_monetization_analytics permission 2024-03-21 04:40:51 -04:00
69dd6052e4 Standardize Permission constants as padded binary u64
Should make it easier to know how and where to modify the bits
2023-09-05 03:54:21 -04:00
b6794fa6d1 Slightly improve performance of constructing Permissions using kwargs 2023-09-05 03:07:25 -04:00
c69ce78ad1 Add create_event permission 2023-07-18 05:45:34 -04:00
cf681105ce Rename Permissions.manage_guild_expressions to manage_expressions 2023-06-11 13:52:16 -04:00
be71383af9 Add create_expressions permission 2023-05-19 20:31:39 -04:00
ca0b444047 Document the change in behaviour of bool(flag_obj) 2023-05-13 14:13:55 -04:00
1767be0081 Add support for voice messages
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2023-04-20 00:08:04 -04:00
ee9e549836 Add use_external_sounds permission 2023-03-31 21:03:47 -04:00
e3e0d93dd9 Add new use_soundboard and manage_guild_expressions permissions 2023-03-28 21:52:11 -04:00
6725f329b2 Set thread related perms in private channels to False 2022-10-01 03:14:03 -04:00
9fe19dcc69 [commands] Add Context.permissions and Context.bot_permissions 2022-07-04 21:48:36 -04:00
78a026aae2 Add remaining bitwise operators to Flags 2022-05-23 21:58:46 -04:00
20a7961e19 Rename use_slash_commands to use_application_commands
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-04-30 06:53:29 -04:00
723584ca19 Add Permissions.elevated() 2022-04-07 10:42:57 -04:00
a5f1c2f592 Take into consideration member timeouts in permission calculations 2022-04-01 09:32:54 -04:00
80e42d139c Add missing types for two permissions in PermissionOverwrite 2022-03-26 21:20:46 -04:00
b0501e56a0 Fix PermissionOverwrite.update typing not allowing None 2022-03-22 18:55:42 -04:00
fd5dea4e34 Update Permissions.stage_moderator 2022-03-15 23:33:11 -04:00
5aa696ccfa Fix typing issues and improve typing completeness across the library
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
2022-03-13 23:52:10 -04:00
4c8b1f9abd Remove unused imports 2022-03-05 21:40:42 -05:00
45dc3d3df9 Rename start_embedded_activities to use_embedded_activities 2022-03-02 01:51:47 -05:00
147948af9b Use typing.Self throughout library 2022-03-01 07:53:24 -05:00
88b520b5ab Reformat code using black
Segments where readability was hampered were fixed by appropriate
format skipping directives. New code should hopefully be black
compatible. The moment they remove the -S option is probably the moment
I stop using black though.
2022-02-20 08:04:58 -05:00
a1dbc0ca27 Add member timeouts and relevant permissions 2022-02-18 03:24:28 -05:00
41d22f4312 Fix all_channel permissions
When the new permission for send_messages_in_threads was added, we added
the wrong bit. Instead of adding the bit as the most significant (37),
we added it as the last significant, which invalidated most of the
permissions defined by this method.
2021-08-27 20:04:18 -04:00
4aafa39e8c Update thread permissions
Discord has renamed / repurposed "Use Public Threads" and "Use Private
Threads", as well as added a new permission "Send Messages in Threads".

For more information, see:
  https://github.com/discord/discord-api-docs/pull/3672
2021-08-26 15:53:21 -04:00
851dfc3c75 Fix permissions.py typing 2021-08-23 01:57:58 -04:00
4a6670c062 Add missing typehint for PermissionOverwrite.pair
Technically inferred but better to be explicit
2021-08-22 07:29:30 -04:00
27debe18ca Update Permissions classmethods to include thread/stage/sticker 2021-08-18 00:46:30 -04:00
60d82cf908 implement guild stickers 2021-07-30 21:25:41 -04:00
be5603141e Remove slots from flags
Fix #7159
2021-07-03 10:52:35 -04:00
88620d052a Typehint permissions 2021-07-03 08:30:27 -04:00
5a72391b72 Add thread related permissions 2021-06-08 07:26:22 -04:00
598057ee79 Add Permissions.manage_events 2021-05-05 14:16:39 -04:00
9d39b135f4 Modernize code to use f-strings
This also removes the encoding on the top, since Python 3 does it by
default. It also changes some methods to use `yield from`.
2021-04-04 07:03:53 -04:00
1b2688518e Implement StageChannel and related methods 2021-04-03 22:43:41 -04:00
3576e2ee01 Add support for Permissions.request_to_speak 2021-04-01 00:53:07 -04:00