diff --git a/discord/channel.py b/discord/channel.py index 0a105c9f5e..79a0f811d2 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -3266,6 +3266,9 @@ class VoiceChannelEffectSendEvent: .. versionadded:: 2.4 + .. versionchanged:: 2.7 + Added the `sound` attribute. + Attributes ---------- animation_type: :class:`int` diff --git a/discord/soundboard.py b/discord/soundboard.py index 7a8502a1f6..a9a07d55ce 100644 --- a/discord/soundboard.py +++ b/discord/soundboard.py @@ -61,6 +61,8 @@ class PartialSoundboardSound(Hashable): The sound's volume. emoji: :class:`PartialEmoji` The sound's emoji. + + .. versionadded:: 2.7 """ __slots__ = ("id", "volume", "emoji", "_http", "_state") @@ -127,13 +129,16 @@ class SoundboardSound(PartialSoundboardSound): name: :class:`str` The sound's name. available: :class:`bool` - Whether the sound is available. + Whether the sound is available. Could be ``False`` if the sound is not available. + This happens for example when the guild lost the boost level required to use the sound. emoji: :class:`PartialEmoji` The sound's emoji. - guild: :class:`Guild` - The guild the sound belongs to. - owner: :class:`Member` - The sound's owner. + guild: :class:`Guild` | :class:`None` + The guild the sound belongs to. Could be ``None`` if the sound is a default sound. + owner: :class:`User` + The sound's owner. Could be ``None`` if the sound is a default sound. + + .. versionadded:: 2.7 """ __slots__ = ( @@ -195,6 +200,8 @@ def edit( ) -> Coroutine[Any, Any, SoundboardSound]: """Edits the sound. + .. versionadded:: 2.7 + Parameters ---------- name: :class:`str` @@ -245,6 +252,8 @@ def edit( def delete(self, *, reason: str | None = None) -> Coroutine[Any, Any, None]: """Deletes the sound. + .. versionadded:: 2.7 + Parameters ---------- reason: :class:`str` diff --git a/docs/api/events.rst b/docs/api/events.rst index 51652ad925..7ed5d9a41f 100644 --- a/docs/api/events.rst +++ b/docs/api/events.rst @@ -1377,3 +1377,14 @@ Voice Channel Status Update :param payload: The raw voice channel status update payload. :type payload: :class:`RawVoiceChannelStatusUpdateEvent` + +Voice Channel Effects +--------------------- +.. function:: on_voice_channel_effect_send(event) + + Called when a voice channel effect is sent. + + .. versionadded:: 2.7 + + :param event: The voice channel effect event. + :type event: :class:`VoiceChannelEffectSendEvent`