Soundboard¶
discord_http.soundboard module¶
- class discord_http.soundboard.PartialSoundboardSound(*, state, id, guild_id=None)¶
Bases:
PartialBase
- Parameters:
state (DiscordAPI)
id (int)
guild_id (int | None)
- async delete(*, reason=None) None ¶
Delete the soundboard sound.
- Parameters:
reason (
str
|None
) – The reason for deleting the soundboard sound- Raises:
ValueError – Soundboard sound does not belong to a guild
- Return type:
- async edit(*, name=<MISSING>, volume=<MISSING>, emoji_name=<MISSING>, emoji_id=<MISSING>, icon=<MISSING>, reason=None) SoundboardSound | PartialSoundboardSound ¶
Edit the soundboard sound.
- Parameters:
name – The new name of the soundboard sound
volume – The new volume of the soundboard sound
emoji_name – The new unicode emoji of the soundboard sound
emoji_id – The ID of the new custom emoji of the soundboard sound
icon – The new icon of the soundboard sound
reason – The reason for editing the soundboard sound
- Returns:
The edited soundboard sound and its data
- Raises:
If both emoji_name and emoji_id are set - If there were no changes applied to the soundboard sound - Soundboard sound does not belong to a guild
- Return type:
- async fetch() SoundboardSound ¶
Returns the soundboard sound data.
- Return type:
- Returns:
The soundboard sound data
- Raises:
ValueError – Soundboard sound does not belong to a guild
- property guild: Guild | PartialGuild | None¶
Returns the guild this soundboard sound is in.
- Return type:
The guild this soundboard sound is in
- Raises:
ValueError – guild_id is not defined, unable to create PartialGuild
- class discord_http.soundboard.SoundboardSound(*, state, data, guild)¶
Bases:
PartialSoundboardSound
- Parameters:
state (DiscordAPI)
data (dict)
guild (PartialGuild | Guild | None)