SoundboardSoundsEvent

Represents a soundboard sound event sent to a voice channel.

Attributes

guild_id : int

The guild's identifier that the event represents.

sounds : None, tuple of SoundboardSound

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

ParameterTypeOptionalKeyword onlyDescription
guild_id

int, Guild

The guild's identifier that the event represents.

sounds

None, iterable of SoundboardSound

The responded sounds.

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

copy()

Copies the soundboard sounds event

Returns

new : instance<type<new>>

copy_with(...)

Copies new soundboard sounds event with the given fields.

ParameterTypeOptionalKeyword onlyDescription
guild_id

int, Guild

The guild's identifier that the event represents.

sounds

None, iterable of SoundboardSound

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.

from_data(data)

Creates a soundboard sounds event from the given data.

ParameterTypeDescription
data

dict of (str, object) items

Voice channel effect event data.

Returns

self : instance<cls>

iter_sounds()

Iterates over the sounds of the soundboard sounds event.

This method is an iterable generator

Yields

sound : SoundboardSound

to_data(...)

Converts the soundboard sounds event into a json serializable object.

ParameterTypeOptionalKeyword onlyDefaultDescription
defaults

bool

False

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.