diff --git a/changelog/1090.feature.rst b/changelog/1090.feature.rst new file mode 100644 index 0000000000..9140fea6ca --- /dev/null +++ b/changelog/1090.feature.rst @@ -0,0 +1 @@ +Add :attr:`Permissions.use_clyde_ai`. diff --git a/changelog/1101.feature.rst b/changelog/1101.feature.rst new file mode 100644 index 0000000000..771ec2b34a --- /dev/null +++ b/changelog/1101.feature.rst @@ -0,0 +1 @@ +Add :attr:`Permissions.set_voice_channel_status`. diff --git a/disnake/abc.py b/disnake/abc.py index 605bb725aa..88c77579fc 100644 --- a/disnake/abc.py +++ b/disnake/abc.py @@ -642,6 +642,7 @@ def _apply_implict_permissions(self, base: Permissions) -> None: base.mention_everyone = False base.embed_links = False base.attach_files = False + base.use_clyde_ai = False # if you can't view a channel then you have no permissions there if not base.view_channel: @@ -886,10 +887,12 @@ async def set_permissions( send_messages_in_threads: Optional[bool] = ..., send_tts_messages: Optional[bool] = ..., send_voice_messages: Optional[bool] = ..., + set_voice_channel_status: Optional[bool] = ..., speak: Optional[bool] = ..., start_embedded_activities: Optional[bool] = ..., stream: Optional[bool] = ..., use_application_commands: Optional[bool] = ..., + use_clyde_ai: Optional[bool] = ..., use_embedded_activities: Optional[bool] = ..., use_external_emojis: Optional[bool] = ..., use_external_sounds: Optional[bool] = ..., diff --git a/disnake/ext/commands/base_core.py b/disnake/ext/commands/base_core.py index c21cc5f2d1..10213aae12 100644 --- a/disnake/ext/commands/base_core.py +++ b/disnake/ext/commands/base_core.py @@ -669,10 +669,12 @@ def default_member_permissions( send_messages_in_threads: bool = ..., send_tts_messages: bool = ..., send_voice_messages: bool = ..., + set_voice_channel_status: bool = ..., speak: bool = ..., start_embedded_activities: bool = ..., stream: bool = ..., use_application_commands: bool = ..., + use_clyde_ai: bool = ..., use_embedded_activities: bool = ..., use_external_emojis: bool = ..., use_external_sounds: bool = ..., diff --git a/disnake/ext/commands/core.py b/disnake/ext/commands/core.py index 2d7ff5497e..ab028e3825 100644 --- a/disnake/ext/commands/core.py +++ b/disnake/ext/commands/core.py @@ -2045,10 +2045,12 @@ def has_permissions( send_messages_in_threads: bool = ..., send_tts_messages: bool = ..., send_voice_messages: bool = ..., + set_voice_channel_status: bool = ..., speak: bool = ..., start_embedded_activities: bool = ..., stream: bool = ..., use_application_commands: bool = ..., + use_clyde_ai: bool = ..., use_embedded_activities: bool = ..., use_external_emojis: bool = ..., use_external_sounds: bool = ..., @@ -2167,10 +2169,12 @@ def bot_has_permissions( send_messages_in_threads: bool = ..., send_tts_messages: bool = ..., send_voice_messages: bool = ..., + set_voice_channel_status: bool = ..., speak: bool = ..., start_embedded_activities: bool = ..., stream: bool = ..., use_application_commands: bool = ..., + use_clyde_ai: bool = ..., use_embedded_activities: bool = ..., use_external_emojis: bool = ..., use_external_sounds: bool = ..., @@ -2267,10 +2271,12 @@ def has_guild_permissions( send_messages_in_threads: bool = ..., send_tts_messages: bool = ..., send_voice_messages: bool = ..., + set_voice_channel_status: bool = ..., speak: bool = ..., start_embedded_activities: bool = ..., stream: bool = ..., use_application_commands: bool = ..., + use_clyde_ai: bool = ..., use_embedded_activities: bool = ..., use_external_emojis: bool = ..., use_external_sounds: bool = ..., @@ -2364,10 +2370,12 @@ def bot_has_guild_permissions( send_messages_in_threads: bool = ..., send_tts_messages: bool = ..., send_voice_messages: bool = ..., + set_voice_channel_status: bool = ..., speak: bool = ..., start_embedded_activities: bool = ..., stream: bool = ..., use_application_commands: bool = ..., + use_clyde_ai: bool = ..., use_embedded_activities: bool = ..., use_external_emojis: bool = ..., use_external_sounds: bool = ..., diff --git a/disnake/permissions.py b/disnake/permissions.py index 8046f14d4a..b74f391d71 100644 --- a/disnake/permissions.py +++ b/disnake/permissions.py @@ -197,10 +197,12 @@ def __init__( send_messages_in_threads: bool = ..., send_tts_messages: bool = ..., send_voice_messages: bool = ..., + set_voice_channel_status: bool = ..., speak: bool = ..., start_embedded_activities: bool = ..., stream: bool = ..., use_application_commands: bool = ..., + use_clyde_ai: bool = ..., use_embedded_activities: bool = ..., use_external_emojis: bool = ..., use_external_sounds: bool = ..., @@ -316,6 +318,9 @@ def all_channel(cls) -> Self: .. versionchanged:: 2.9 Added :attr:`use_soundboard` and :attr:`send_voice_messages` permissions. + + .. versionchanged:: 2.10 + Added :attr:`use_clyde_ai`, :attr:`set_voice_channel_status` permissions. """ instance = cls.all() instance.update( @@ -396,6 +401,9 @@ def text(cls) -> Self: .. versionchanged:: 2.9 Added :attr:`send_voice_messages` permission. + + .. versionchanged:: 2.10 + Added :attr:`use_clyde_ai` permission. """ return cls( send_messages=True, @@ -414,6 +422,7 @@ def text(cls) -> Self: send_tts_messages=True, use_slash_commands=True, send_voice_messages=True, + use_clyde_ai=True, ) @classmethod @@ -427,6 +436,9 @@ def voice(cls) -> Self: .. versionchanged:: 2.9 Added :attr:`use_soundboard` and :attr:`use_external_sounds` permissions. + + .. versionchanged:: 2.10 + Added :attr:`set_voice_channel_status` permission. """ return cls( connect=True, @@ -440,6 +452,7 @@ def voice(cls) -> Self: mute_members=True, deafen_members=True, move_members=True, + set_voice_channel_status=True, ) @classmethod @@ -565,10 +578,12 @@ def update( send_messages_in_threads: bool = ..., send_tts_messages: bool = ..., send_voice_messages: bool = ..., + set_voice_channel_status: bool = ..., speak: bool = ..., start_embedded_activities: bool = ..., stream: bool = ..., use_application_commands: bool = ..., + use_clyde_ai: bool = ..., use_embedded_activities: bool = ..., use_external_emojis: bool = ..., use_external_sounds: bool = ..., @@ -994,6 +1009,22 @@ 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.10 + """ + return 1 << 47 + + @flag_value + def set_voice_channel_status(self) -> int: + """:class:`bool`: Returns ``True`` if a user can set a voice channel's status. + + .. versionadded:: 2.10 + """ + return 1 << 48 + def _augment_from_permissions(cls): cls.VALID_NAMES = set(Permissions.VALID_FLAGS) @@ -1099,10 +1130,12 @@ class PermissionOverwrite: send_messages_in_threads: Optional[bool] send_tts_messages: Optional[bool] send_voice_messages: Optional[bool] + set_voice_channel_status: Optional[bool] speak: Optional[bool] start_embedded_activities: Optional[bool] stream: Optional[bool] use_application_commands: Optional[bool] + use_clyde_ai: Optional[bool] use_embedded_activities: Optional[bool] use_external_emojis: Optional[bool] use_external_sounds: Optional[bool] @@ -1163,10 +1196,12 @@ def __init__( send_messages_in_threads: Optional[bool] = ..., send_tts_messages: Optional[bool] = ..., send_voice_messages: Optional[bool] = ..., + set_voice_channel_status: Optional[bool] = ..., speak: Optional[bool] = ..., start_embedded_activities: Optional[bool] = ..., stream: Optional[bool] = ..., use_application_commands: Optional[bool] = ..., + use_clyde_ai: Optional[bool] = ..., use_embedded_activities: Optional[bool] = ..., use_external_emojis: Optional[bool] = ..., use_external_sounds: Optional[bool] = ..., @@ -1294,10 +1329,12 @@ def update( send_messages_in_threads: Optional[bool] = ..., send_tts_messages: Optional[bool] = ..., send_voice_messages: Optional[bool] = ..., + set_voice_channel_status: Optional[bool] = ..., speak: Optional[bool] = ..., start_embedded_activities: Optional[bool] = ..., stream: Optional[bool] = ..., use_application_commands: Optional[bool] = ..., + use_clyde_ai: Optional[bool] = ..., use_embedded_activities: Optional[bool] = ..., use_external_emojis: Optional[bool] = ..., use_external_sounds: Optional[bool] = ..., diff --git a/disnake/threads.py b/disnake/threads.py index 2126e85605..4e92642b8e 100644 --- a/disnake/threads.py +++ b/disnake/threads.py @@ -477,6 +477,7 @@ def permissions_for( base.mention_everyone = False base.embed_links = False base.attach_files = False + base.use_clyde_ai = False # if you can't view a channel then you have no permissions there if not base.view_channel: