diff --git a/discord/channel.py b/discord/channel.py index 79a0f811d2..6cb5fce14d 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -77,7 +77,6 @@ "PartialMessageable", "ForumChannel", "ForumTag", - # "VoiceChannelEffect", "VoiceChannelEffectSendEvent", ) @@ -3254,6 +3253,11 @@ def get_partial_message(self, message_id: int, /) -> PartialMessage: class VoiceChannelEffectAnimation(NamedTuple): + """Represents an animation that can be sent to a voice channel. + + .. versionadded:: 2.7 + """ + id: int type: VoiceChannelEffectAnimationType @@ -3264,10 +3268,7 @@ class VoiceChannelSoundEffect(PartialSoundboardSound): ... class VoiceChannelEffectSendEvent: """Represents the payload for an :func:`on_voice_channel_effect_send` - .. versionadded:: 2.4 - - .. versionchanged:: 2.7 - Added the `sound` attribute. + .. versionadded:: 2.7 Attributes ---------- diff --git a/discord/client.py b/discord/client.py index 276d52d1cf..f2d22f5505 100644 --- a/discord/client.py +++ b/discord/client.py @@ -2275,7 +2275,7 @@ async def delete_emoji(self, emoji: Snowflake) -> None: def get_sound(self, sound_id: int) -> SoundboardSound | None: """Gets a :class:`.Sound` from the bot's sound cache. - .. versionadded:: 2.4 + .. versionadded:: 2.7 Parameters ---------- diff --git a/discord/enums.py b/discord/enums.py index fd671cb2ce..8f928af948 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -1055,7 +1055,10 @@ class PollLayoutType(Enum): class VoiceChannelEffectAnimationType(Enum): - """Voice channel effect animation type""" + """Voice channel effect animation type + + .. versionadded:: 2.7 + """ premium = 0 basic = 1 diff --git a/discord/guild.py b/discord/guild.py index 44b373f04d..c1a5d47b79 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -821,7 +821,7 @@ def categories(self) -> list[CategoryChannel]: def sounds(self) -> list[SoundboardSound]: """A list of soundboard sounds that belong to this guild. - .. versionadded:: 2.5 + .. versionadded:: 2.7 This is sorted by the position and are in UI order from top to bottom. """ @@ -4316,6 +4316,8 @@ def entitlements( def get_sound(self, sound_id: int): """Returns a sound with the given ID. + .. versionadded :: 2.7 + Parameters ---------- sound_id: :class:`int` diff --git a/discord/http.py b/discord/http.py index cbc958c56d..4128b71bf2 100644 --- a/discord/http.py +++ b/discord/http.py @@ -3230,7 +3230,7 @@ def get_guild_sound( ) def edit_guild_sound( - self, guild_id: Snowflake, sound_Id: Snowflake, *, reason: str | None, **payload + self, guild_id: Snowflake, sound_id: Snowflake, *, reason: str | None, **payload ): keys = ( "name", @@ -3246,14 +3246,14 @@ def edit_guild_sound( "PATCH", "/guilds/{guild_id}/soundboard-sounds/{sound_id}", guild_id=guild_id, - sound_id=sound_Id, + sound_id=sound_id, ), json=payload, reason=reason, ) def send_soundboard_sound( - self, chanel_id: int, sound: PartialSoundboardSound + self, channel_id: int, sound: PartialSoundboardSound ) -> None: payload = { "sound_id": sound.id, diff --git a/discord/state.py b/discord/state.py index f235941fcc..c3adac8485 100644 --- a/discord/state.py +++ b/discord/state.py @@ -2004,7 +2004,6 @@ def create_message( return Message(state=self, channel=channel, data=data) def parse_voice_channel_effect_send(self, data) -> None: - __import__("json") if sound_id := int(data.get("sound_id", 0)): sound = self._get_sound(sound_id) if sound is None: