Skip to content

Commit

Permalink
📝 Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Paillat-dev committed Oct 25, 2024
1 parent 2922472 commit ae4983d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
3 changes: 3 additions & 0 deletions discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3266,6 +3266,9 @@ class VoiceChannelEffectSendEvent:
.. versionadded:: 2.4
.. versionchanged:: 2.7
Added the `sound` attribute.
Attributes
----------
animation_type: :class:`int`
Expand Down
19 changes: 14 additions & 5 deletions discord/soundboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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__ = (
Expand Down Expand Up @@ -195,6 +200,8 @@ def edit(
) -> Coroutine[Any, Any, SoundboardSound]:
"""Edits the sound.
.. versionadded:: 2.7
Parameters
----------
name: :class:`str`
Expand Down Expand Up @@ -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`
Expand Down
11 changes: 11 additions & 0 deletions docs/api/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`

0 comments on commit ae4983d

Please sign in to comment.