mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 17:36:15 +00:00
Support for Soundboard and VC effects
This commit is contained in:
172
docs/api.rst
172
docs/api.rst
@ -1298,6 +1298,35 @@ Scheduled Events
|
||||
:type user: :class:`User`
|
||||
|
||||
|
||||
Soundboard
|
||||
~~~~~~~~~~~
|
||||
|
||||
.. function:: on_soundboard_sound_create(sound)
|
||||
on_soundboard_sound_delete(sound)
|
||||
|
||||
Called when a :class:`SoundboardSound` is created or deleted.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
:param sound: The soundboard sound that was created or deleted.
|
||||
:type sound: :class:`SoundboardSound`
|
||||
|
||||
.. function:: on_soundboard_sound_update(before, after)
|
||||
|
||||
Called when a :class:`SoundboardSound` is updated.
|
||||
|
||||
The following examples illustrate when this event is called:
|
||||
|
||||
- The name is changed.
|
||||
- The emoji is changed.
|
||||
- The volume is changed.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
:param sound: The soundboard sound that was updated.
|
||||
:type sound: :class:`SoundboardSound`
|
||||
|
||||
|
||||
Stages
|
||||
~~~~~~~
|
||||
|
||||
@ -1483,6 +1512,17 @@ Voice
|
||||
:param after: The voice state after the changes.
|
||||
:type after: :class:`VoiceState`
|
||||
|
||||
.. function:: on_voice_channel_effect(effect)
|
||||
|
||||
Called when a :class:`Member` sends a :class:`VoiceChannelEffect` in a voice channel the bot is in.
|
||||
|
||||
This requires :attr:`Intents.voice_states` to be enabled.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
:param effect: The effect that is sent.
|
||||
:type effect: :class:`VoiceChannelEffect`
|
||||
|
||||
.. _discord-api-utils:
|
||||
|
||||
Utility Functions
|
||||
@ -2945,6 +2985,42 @@ of :class:`enum.Enum`.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
|
||||
.. attribute:: soundboard_sound_create
|
||||
|
||||
A soundboard sound was created.
|
||||
|
||||
Possible attributes for :class:`AuditLogDiff`:
|
||||
|
||||
- :attr:`~AuditLogDiff.name`
|
||||
- :attr:`~AuditLogDiff.emoji`
|
||||
- :attr:`~AuditLogDiff.volume`
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
.. attribute:: soundboard_sound_update
|
||||
|
||||
A soundboard sound was updated.
|
||||
|
||||
Possible attributes for :class:`AuditLogDiff`:
|
||||
|
||||
- :attr:`~AuditLogDiff.name`
|
||||
- :attr:`~AuditLogDiff.emoji`
|
||||
- :attr:`~AuditLogDiff.volume`
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
.. attribute:: soundboard_sound_delete
|
||||
|
||||
A soundboard sound was deleted.
|
||||
|
||||
Possible attributes for :class:`AuditLogDiff`:
|
||||
|
||||
- :attr:`~AuditLogDiff.name`
|
||||
- :attr:`~AuditLogDiff.emoji`
|
||||
- :attr:`~AuditLogDiff.volume`
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
.. class:: AuditLogActionCategory
|
||||
|
||||
Represents the category that the :class:`AuditLogAction` belongs to.
|
||||
@ -3663,6 +3739,21 @@ of :class:`enum.Enum`.
|
||||
A burst reaction, also known as a "super reaction".
|
||||
|
||||
|
||||
.. class:: VoiceChannelEffectAnimationType
|
||||
|
||||
Represents the animation type of a voice channel effect.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
.. attribute:: premium
|
||||
|
||||
A fun animation, sent by a Nitro subscriber.
|
||||
|
||||
.. attribute:: basic
|
||||
|
||||
The standard animation.
|
||||
|
||||
|
||||
.. _discord-api-audit-logs:
|
||||
|
||||
Audit Log Data
|
||||
@ -4128,11 +4219,12 @@ AuditLogDiff
|
||||
|
||||
.. attribute:: emoji
|
||||
|
||||
The name of the emoji that represents a sticker being changed.
|
||||
The emoji which represents one of the following:
|
||||
|
||||
See also :attr:`GuildSticker.emoji`.
|
||||
* :attr:`GuildSticker.emoji`
|
||||
* :attr:`SoundboardSound.emoji`
|
||||
|
||||
:type: :class:`str`
|
||||
:type: Union[:class:`str`, :class:`PartialEmoji`]
|
||||
|
||||
.. attribute:: unicode_emoji
|
||||
|
||||
@ -4153,9 +4245,10 @@ AuditLogDiff
|
||||
|
||||
.. attribute:: available
|
||||
|
||||
The availability of a sticker being changed.
|
||||
The availability of one of the following being changed:
|
||||
|
||||
See also :attr:`GuildSticker.available`
|
||||
* :attr:`GuildSticker.available`
|
||||
* :attr:`SoundboardSound.available`
|
||||
|
||||
:type: :class:`bool`
|
||||
|
||||
@ -4378,6 +4471,22 @@ AuditLogDiff
|
||||
|
||||
:type: Optional[:class:`PartialEmoji`]
|
||||
|
||||
.. attribute:: user
|
||||
|
||||
The user that represents the uploader of a soundboard sound.
|
||||
|
||||
See also :attr:`SoundboardSound.user`
|
||||
|
||||
:type: Union[:class:`Member`, :class:`User`]
|
||||
|
||||
.. attribute:: volume
|
||||
|
||||
The volume of a soundboard sound.
|
||||
|
||||
See also :attr:`SoundboardSound.volume`
|
||||
|
||||
:type: :class:`float`
|
||||
|
||||
.. this is currently missing the following keys: reason and application_id
|
||||
I'm not sure how to port these
|
||||
|
||||
@ -4799,6 +4908,35 @@ VoiceChannel
|
||||
:members:
|
||||
:inherited-members:
|
||||
|
||||
.. attributetable:: VoiceChannelEffect
|
||||
|
||||
.. autoclass:: VoiceChannelEffect()
|
||||
:members:
|
||||
:inherited-members:
|
||||
|
||||
.. class:: VoiceChannelEffectAnimation
|
||||
|
||||
A namedtuple which represents a voice channel effect animation.
|
||||
|
||||
.. versionadded:: 2.5
|
||||
|
||||
.. attribute:: id
|
||||
|
||||
The ID of the animation.
|
||||
|
||||
:type: :class:`int`
|
||||
.. attribute:: type
|
||||
|
||||
The type of the animation.
|
||||
|
||||
:type: :class:`VoiceChannelEffectAnimationType`
|
||||
|
||||
.. attributetable:: VoiceChannelSoundEffect
|
||||
|
||||
.. autoclass:: VoiceChannelSoundEffect()
|
||||
:members:
|
||||
:inherited-members:
|
||||
|
||||
StageChannel
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
@ -4965,6 +5103,30 @@ GuildSticker
|
||||
.. autoclass:: GuildSticker()
|
||||
:members:
|
||||
|
||||
BaseSoundboardSound
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. attributetable:: BaseSoundboardSound
|
||||
|
||||
.. autoclass:: BaseSoundboardSound()
|
||||
:members:
|
||||
|
||||
SoundboardDefaultSound
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. attributetable:: SoundboardDefaultSound
|
||||
|
||||
.. autoclass:: SoundboardDefaultSound()
|
||||
:members:
|
||||
|
||||
SoundboardSound
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. attributetable:: SoundboardSound
|
||||
|
||||
.. autoclass:: SoundboardSound()
|
||||
:members:
|
||||
|
||||
ShardInfo
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
Reference in New Issue
Block a user