108 Commits

Author SHA1 Message Date
Rapptz
cf681105ce Rename Permissions.manage_guild_expressions to manage_expressions 2023-06-11 13:52:16 -04:00
Andrin S
be71383af9
Add create_expressions permission 2023-05-19 20:31:39 -04:00
Jakub Kuczys
ca0b444047
Document the change in behaviour of bool(flag_obj) 2023-05-13 14:13:55 -04:00
Andrin S
1767be0081
Add support for voice messages
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2023-04-20 00:08:04 -04:00
Andrin S
ee9e549836
Add use_external_sounds permission 2023-03-31 21:03:47 -04:00
Andrin S
e3e0d93dd9
Add new use_soundboard and manage_guild_expressions permissions 2023-03-28 21:52:11 -04:00
Jakub Kuczys
6725f329b2
Set thread related perms in private channels to False 2022-10-01 03:14:03 -04:00
zephyrkul
9fe19dcc69
[commands] Add Context.permissions and Context.bot_permissions 2022-07-04 21:48:36 -04:00
zephyrkul
78a026aae2
Add remaining bitwise operators to Flags 2022-05-23 21:58:46 -04:00
invalid-user
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
Narmy
723584ca19
Add Permissions.elevated() 2022-04-07 10:42:57 -04:00
Rapptz
a5f1c2f592 Take into consideration member timeouts in permission calculations 2022-04-01 09:32:54 -04:00
I. Ahmad
80e42d139c
Add missing types for two permissions in PermissionOverwrite 2022-03-26 21:20:46 -04:00
Rapptz
b0501e56a0 Fix PermissionOverwrite.update typing not allowing None 2022-03-22 18:55:42 -04:00
Stocker
fd5dea4e34
Update Permissions.stage_moderator 2022-03-15 23:33:11 -04:00
Stocker
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
Rapptz
4c8b1f9abd Remove unused imports 2022-03-05 21:40:42 -05:00
Rapptz
45dc3d3df9 Rename start_embedded_activities to use_embedded_activities 2022-03-02 01:51:47 -05:00
Josh
147948af9b
Use typing.Self throughout library 2022-03-01 07:53:24 -05:00
Rapptz
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
Maya
a1dbc0ca27
Add member timeouts and relevant permissions 2022-02-18 03:24:28 -05:00
James Gayfer
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
James Gayfer
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
apple502j
851dfc3c75
Fix permissions.py typing 2021-08-23 01:57:58 -04:00
Rapptz
4a6670c062 Add missing typehint for PermissionOverwrite.pair
Technically inferred but better to be explicit
2021-08-22 07:29:30 -04:00
z03h
27debe18ca
Update Permissions classmethods to include thread/stage/sticker 2021-08-18 00:46:30 -04:00
Nadir Chowdhury
60d82cf908
implement guild stickers 2021-07-30 21:25:41 -04:00
Rapptz
be5603141e Remove slots from flags
Fix #7159
2021-07-03 10:52:35 -04:00
Rapptz
88620d052a Typehint permissions 2021-07-03 08:30:27 -04:00
Rapptz
5a72391b72 Add thread related permissions 2021-06-08 07:26:22 -04:00
Rapptz
598057ee79 Add Permissions.manage_events 2021-05-05 14:16:39 -04:00
Rapptz
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
Nadir Chowdhury
1b2688518e
Implement StageChannel and related methods 2021-04-03 22:43:41 -04:00
Rapptz
3576e2ee01 Add support for Permissions.request_to_speak 2021-04-01 00:53:07 -04:00
Nadir Chowdhury
7d345e8e4e
remove trailing whitespace 2021-03-13 00:42:25 -05:00
TheOneMusic
259c3909a8
Fix Permissions.all_channel documentation to link attributes 2021-03-01 08:57:28 -05:00
TheOneMusic
9c52432274
Update permission class methods to match Discord UI 2021-02-28 23:30:08 -05:00
Rapptz
a8f44174ba Add Permissions.use_slash_commands 2021-02-18 07:28:37 -05:00
Nihaal Sangha
69bdc3a184
Change copyright year to present 2021-01-15 05:28:11 -05:00
Rapptz
1c03a4aac9 Evict keys when they're set to None in PermissionOverwrite
Fixes #5929
2020-10-17 01:59:00 -04:00
apple502j
0ebf5b2fa7
Add support for flag alias 2020-09-24 00:16:37 -04:00
Michael
93fa46713a
Fix and add documentation 2020-09-23 03:19:35 -04:00
Skezza
c3bca7ec73
Documentation formatting 2020-06-30 23:32:00 -04:00
Sebastian Law
b4b953bfc6
Fix various inconsistencies within the documentation (#5067) 2020-06-28 03:45:58 -04:00
Rapptz
215fed831c Mention that you can create Permissions via kwargs now 2020-01-23 00:04:45 -05:00
Rapptz
02397306b2 Drop superfluous zero in version related changes in the documentation 2020-01-21 03:47:56 -05:00
Rapptz
6071607176 Bump copyright year to 2020
Closes #2510
2020-01-19 20:03:00 -05:00
Rapptz
650beee53d Add instance check to PermissionOvewrite.__eq__ 2020-01-19 02:41:50 -05:00
Rapptz
2770137bd6 Redesign permissions to allow aliases to be used.
This adds manage_permissions, view_channel, and use_external_emojis
aliases to Permissions. It should be noted that to prevent breaking
changes and for sake of usefulness, aliases are not included in
the `__iter__` for either Permissions or PermissionOverwrite.

Fixes #2496
2020-01-11 19:52:25 -05:00
Josh B
46246a2844 Add view_guild_insights permission 2019-11-15 04:23:26 -05:00