hikari.events.voice_events
#
Events that fire when voice state changes.
VoiceEvent #
Bases: ShardEvent
, ABC
Base for any voice-related event.
VoiceServerUpdateEvent #
Bases: VoiceEvent
Event fired when a voice server is changed.
Sent when initially connecting to voice and when the current voice instance falls over to a new server.
app class-attribute
instance-attribute
#
App instance for this application.
endpoint property
#
URI for this voice server host, with the correct scheme prepended.
If this is None
, it means that the server has been deallocated and you have to disconnect. You will later receive a new event specifying what endpoint to connect to.
guild_id class-attribute
instance-attribute
#
ID of the guild this event is for.
raw_endpoint class-attribute
instance-attribute
#
Raw endpoint URI that Discord sent.
If this is None
, it means that the server has been deallocated and you have to disconnect. You will later receive a new event specifying what endpoint to connect to.
Warning
This will not contain the scheme to use. Use the endpoint
property to get a representation that has this prepended.
shard class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
VoiceStateUpdateEvent #
Bases: VoiceEvent
Event fired when a user changes their voice state.
Sent when a user joins, leaves or moves voice channel(s).
This is also fired for the application user, and is used when preparing to connect to the voice gateway to stream audio or video content.
old_state class-attribute
instance-attribute
#
old_state: Optional[VoiceState] = field(repr=True)
The old voice state.
This will be None
if the voice state missing from the cache.
shard class-attribute
instance-attribute
#
shard: GatewayShard = field(metadata={SKIP_DEEP_COPY: True})
Shard that received this event.
state class-attribute
instance-attribute
#
state: VoiceState = field(repr=True)
Voice state that this update contained.