hikariwave.connection
Connection
ConnectionState
Bases: IntEnum
The voice connection's state.
CONNECTED
class-attribute
instance-attribute
CONNECTED = 0
Voice connection has established it's voice gateway and voice server connections.
CONNECTING
class-attribute
instance-attribute
CONNECTING = 1
Voice connection is pending connections with the voice gateway and voice server.
DISCONNECTED
class-attribute
instance-attribute
DISCONNECTED = 2
Voice connection is not connected to any voice gateway or voice server.
DISCONNECTING
class-attribute
instance-attribute
DISCONNECTING = 3
Voice connection is pending disconnect with the voice gateway and voice server.
VoiceConnection
VoiceConnection(
client: VoiceClient,
guild_id: hikari.Snowflake,
channel_id: hikari.Snowflake,
endpoint: str,
session_id: str,
token: str,
)
An active connection to a voice channel.
Create a new voice connection.
| PARAMETER | DESCRIPTION |
|---|---|
client
|
The controlling voice system client managing this connection.
TYPE:
|
guild_id
|
The ID of the guild this connection manages. |
channel_id
|
The ID of the voice channel this connection manages. |
endpoint
|
The voice gateway websocket URI.
TYPE:
|
session_id
|
The voice gateway session ID.
TYPE:
|
token
|
The voice gateway token.
TYPE:
|
channel_id
property
The ID of the voice channel this connection manages.
latency
property
latency: float | None
The heartbeat latency of the voice gateway connection, if connected.
disconnect
async
disconnect() -> None
Disconnect from the current channel.