Skip to content

hikari.events.voice_events#

Events that fire when voice state changes.

VoiceEvent #

Bases: ShardEvent, ABC

Base for any voice-related event.

guild_id abstractmethod property #

guild_id: Snowflake

ID of the guild this event is for.

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: RESTAware = field(metadata={SKIP_DEEP_COPY: True})

App instance for this application.

endpoint property #

endpoint: Optional[str]

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 #

guild_id: Snowflake = field(repr=True)

ID of the guild this event is for.

raw_endpoint class-attribute instance-attribute #

raw_endpoint: Optional[str] = field(repr=True)

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.

token class-attribute instance-attribute #

token: str = field(repr=False)

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

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.

app property #

app: RESTAware

App instance for this application.

guild_id property #

guild_id: Snowflake

ID of the guild this event is for.

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.