SoundboardSoundsEvent
Represents a soundboard sound event sent to a voice channel.
Attributes
int
The guild's identifier that the event represents.
The responded sounds.
Properties
guild
Returns the soundboard sound event's guild. If the guild is not cached returns None
.
Returns
guild : None
, Guild
Methods
(...)
__new__Creates a self soundboard sounds event
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
guild_id |
| The guild's identifier that the event represents. | ||
sounds |
| The responded sounds. |
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
()
copyCopies the soundboard sounds event
Returns
new : instance<type<new>>
(...)
copy_withCopies new soundboard sounds event with the given fields.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
guild_id |
| The guild's identifier that the event represents. | ||
sounds |
| The responded sounds. |
Returns
new : instance<type<new>>
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
(data)
from_dataCreates a soundboard sounds event from the given data.
Parameter | Type | Description |
---|---|---|
data |
| Voice channel effect event data. |
Returns
self : instance<cls>
()
iter_soundsIterates over the sounds of the soundboard sounds event.
This method is an iterable generator
Yields
sound : SoundboardSound
(...)
to_dataConverts the soundboard sounds event into a json serializable object.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
defaults |
|
| Whether default field values should be included. |
Returns
data : dict
of (str
, object
) items
()
__eq__Returns whether the two events are equal.
()
__hash__Returns the event's hash.
()
__iter__Unpacks the event.
This method is an iterable generator.
()
__len__Helper for unpacking if needed.
()
__repr__Returns the event's representation.