diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7b286bce..4fad34ea92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,9 @@ These changes are available on the `master` branch, but have not yet been releas ([#2206](https://github.com/Pycord-Development/pycord/pull/2206)) - Added function `Guild.delete_auto_moderation_rule`. ([#2153](https://github.com/Pycord-Development/pycord/pull/2153)) +- Added + [`USE_CLYDE_AI` permission](https://github.com/discord/discord-api-docs/pull/6354). + ([#2224](https://github.com/Pycord-Development/pycord/pull/2224)) ### Changed diff --git a/discord/flags.py b/discord/flags.py index 308083d673..54981e3bd0 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -255,12 +255,12 @@ def _set_flag(self, o: int, toggle: bool) -> None: @flag_value def join_notifications(self): """:class:`bool`: Returns ``True`` if the system channel is used for member join notifications.""" - return 1 + return 1 << 0 @flag_value def premium_subscriptions(self): """:class:`bool`: Returns ``True`` if the system channel is used for "Nitro boosting" notifications.""" - return 2 + return 1 << 1 @flag_value def guild_reminder_notifications(self): @@ -268,7 +268,7 @@ def guild_reminder_notifications(self): .. versionadded:: 2.0 """ - return 4 + return 1 << 2 @flag_value def join_notification_replies(self): @@ -276,7 +276,23 @@ def join_notification_replies(self): .. versionadded:: 2.0 """ - return 8 + return 1 << 3 + + @flag_value + def role_subscription_purchase_notifications(self): + """:class:`bool`: Returns ``True`` if the system channel is used for role subscription purchase and renewal notifications. + + .. versionadded:: 2.5 + """ + return 1 << 4 + + @flag_value + def role_subscription_purchase_notifications_replies(self): + """:class:`bool`: Returns ``True`` if the system channel is allowing role subscription purchase sticker replies. + + .. versionadded:: 2.5 + """ + return 1 << 5 @fill_with_flags() diff --git a/discord/permissions.py b/discord/permissions.py index e94e6c2116..ad32a4880e 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -180,7 +180,7 @@ def all(cls: type[P]) -> P: """A factory method that creates a :class:`Permissions` with all permissions set to ``True``. """ - return cls(0b11111111111111111111111111111111111111111) + return cls(0b110000011111111111111111111111111111111111111111) @classmethod def all_channel(cls: type[P]) -> P: @@ -242,8 +242,11 @@ def text(cls: type[P]) -> P: .. versionchanged:: 2.0 Added :attr:`create_public_threads`, :attr:`create_private_threads`, :attr:`manage_threads`, :attr:`send_messages_in_threads` and :attr:`use_external_stickers` permissions. + + .. versionchanged:: 2.5 + Added :attr:`use_clyde_ai` permission. """ - return cls(0b111110010000000000001111111100001000000) + return cls(0b100000000111110010000000000001111111100001000000) @classmethod def voice(cls: type[P]) -> P: @@ -618,6 +621,14 @@ def send_voice_messages(self) -> int: """ return 1 << 46 + @flag_value + def use_clyde_ai(self) -> int: + """:class:`bool`: Returns ``True`` if a user can interact with the Clyde AI bot. + + .. versionadded:: 2.5 + """ + return 1 << 47 + PO = TypeVar("PO", bound="PermissionOverwrite") @@ -736,6 +747,7 @@ class PermissionOverwrite: start_embedded_activities: bool | None moderate_members: bool | None send_voice_messages: bool | None + use_clyde_ai: bool | None def __init__(self, **kwargs: bool | None): self._values: dict[str, bool | None] = {}