hikari.events.voice_events#

Events that fire when voice state changes.

Module Contents#

class hikari.events.voice_events.VoiceEvent[source]#

Bases: hikari.events.shard_events.ShardEvent, abc.ABC

Base for any voice-related event.

abstract property guild_id: hikari.snowflakes.Snowflake[source]#

ID of the guild this event is for.

class hikari.events.voice_events.VoiceServerUpdateEvent[source]#

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.

property endpoint: str | None[source]#

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.

raw_endpoint: str | None[source]#

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.

token: str[source]#

Token that should be used to authenticate with the voice gateway.

class hikari.events.voice_events.VoiceStateUpdateEvent[source]#

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.

property guild_id: hikari.snowflakes.Snowflake[source]#

ID of the guild this event is for.

old_state: hikari.voices.VoiceState | None[source]#

The old voice state.

This will be None if the voice state missing from the cache.

state: hikari.voices.VoiceState[source]#

Voice state that this update contained.