diff --git a/discord/permissions.py b/discord/permissions.py index e94e6c2116..dd959c890c 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -374,7 +374,6 @@ def view_channel(self) -> int: @make_permission_alias("view_channel") def read_messages(self) -> int: """:class:`bool`: An alias for :attr:`view_channel`. - .. versionadded:: 1.3 """ return 1 << 10 @@ -420,14 +419,13 @@ def mention_everyone(self) -> int: return 1 << 17 @flag_value - def external_emojis(self) -> int: + def use_external_emojis(self) -> int: """:class:`bool`: Returns ``True`` if a user can use emojis from other guilds.""" return 1 << 18 - @make_permission_alias("external_emojis") - def use_external_emojis(self) -> int: - """:class:`bool`: An alias for :attr:`external_emojis`. - + @make_permission_alias("use_external_emojis") + def external_emojis(self) -> int: + """:class:`bool`: An alias for :attr:`use_external_emojis`. .. versionadded:: 1.3 """ return 1 << 18 @@ -571,21 +569,21 @@ def create_private_threads(self) -> int: return 1 << 36 @flag_value - def external_stickers(self) -> int: + def use_external_stickers(self) -> int: """:class:`bool`: Returns ``True`` if a user can use stickers from other guilds. .. versionadded:: 2.0 """ return 1 << 37 - @make_permission_alias("external_stickers") - def use_external_stickers(self) -> int: - """:class:`bool`: An alias for :attr:`external_stickers`. - + @make_permission_alias("use_external_stickers") + def external_stickers(self) -> int: + """:class:`bool`: An alias for :attr:`use_external_stickers`. .. versionadded:: 2.0 """ return 1 << 37 + @flag_value def send_messages_in_threads(self) -> int: """:class:`bool`: Returns ``True`` if a user can send messages in threads. @@ -595,13 +593,20 @@ def send_messages_in_threads(self) -> int: return 1 << 38 @flag_value - def start_embedded_activities(self) -> int: + def use_embedded_activities(self) -> int: """:class:`bool`: Returns ``True`` if a user can launch an activity flagged 'EMBEDDED' in a voice channel. .. versionadded:: 2.0 """ return 1 << 39 + @make_permission_alias("use_embedded_activities") + def start_embedded_activities(self) -> int: + """:class:`bool`: An alias for :attr:`use_embedded_activities`. + .. versionadded:: 2.0 + """ + return 1 << 39 + @flag_value def moderate_members(self) -> int: """:class:`bool`: Returns ``True`` if a user can moderate members (timeout). @@ -610,6 +615,36 @@ def moderate_members(self) -> int: """ return 1 << 40 + @flag_value + def view_creator_monetization_analytics(self) -> int: + """:class:`bool`: Returns ``True`` if a user can view creator monetization analytics. + .. versionadded:: 2.4""" + return 1 << 41 + + @flag_value + def use_soundboard(self) -> int: + """:class:`bool`: Returns ``True`` if a user can use soundboard. + .. versionadded:: 2.4""" + return 1 << 42 + + @flag_value + def create_guild_expressions(self) -> int: + """:class:`bool`: Returns ``True`` if a user can create emoji, stickers, and soundboard sounds. + .. versionadded:: 2.4""" + return 1 << 43 + + @flag_value + def create_events(self) -> int: + """:class:`bool`: Returns ``True`` if a user can create and edit events. + .. versionadded:: 2.4""" + return 1 << 44 + + @flag_value + def use_external_sounds(self) -> int: + """:class:`bool`: Returns ``True`` if a user can use custom soundboard sounds. + .. versionadded:: 2.4""" + return 1 << 45 + @flag_value def send_voice_messages(self) -> int: """:class:`bool`: Returns ``True`` if a member can send voice messages. @@ -618,6 +653,12 @@ def send_voice_messages(self) -> int: """ return 1 << 46 + @flag_value + def send_polls(self) -> int: + """:class:`bool`: Returns ``True`` if a user can send polls. + .. versionadded:: 2.4""" + return 1 << 49 + PO = TypeVar("PO", bound="PermissionOverwrite") @@ -731,11 +772,18 @@ class PermissionOverwrite: create_public_threads: bool | None create_private_threads: bool | None send_messages_in_threads: bool | None - external_stickers: bool | None use_external_stickers: bool | None + external_stickers: bool | None + use_embedded_activities: bool | None start_embedded_activities: bool | None moderate_members: bool | None send_voice_messages: bool | None + view_creator_monetization_analytics: bool | None + use_soundboard: bool | None + create_guild_expressions: bool | None + create_events: bool | None + use_external_sounds: bool | None + send_polls: bool | None def __init__(self, **kwargs: bool | None): self._values: dict[str, bool | None] = {}