hikari.impl.voice
#
Implementation of a simple voice management system.
VoiceComponentImpl
#
VoiceComponentImpl(app: GatewayBotAware)
Bases: VoiceComponent
A standard voice component management implementation.
This is the regular implementation you will generally use to connect to voice channels with.
connections
instance-attribute
#
connections: Mapping[Snowflake, VoiceConnection] = MappingProxyType(
_connections
)
Return a mapping of guild-id to active voice connection.
close
async
#
Shut down all connections, waiting for them to terminate.
Once this is done, unsubscribe from any events.
If you simply wish to disconnect every connection, use
hikari.api.VoiceComponent.disconnect
instead.
connect_to
async
#
connect_to(
guild: SnowflakeishOr[PartialGuild],
channel: SnowflakeishOr[GuildVoiceChannel],
voice_connection_type: Type[_VoiceConnectionT],
*,
deaf: bool = False,
mute: bool = False,
timeout: Optional[int] = 5,
**kwargs: Any
) -> _VoiceConnectionT
Connect to a given voice channel.
PARAMETER | DESCRIPTION |
---|---|
guild |
The guild to connect to.
TYPE:
|
channel |
The channel or channel ID to connect to.
TYPE:
|
voice_connection_type |
The type of voice connection to use. This should be initialized
internally using the
TYPE:
|
deaf |
If
TYPE:
|
mute |
If
TYPE:
|
timeout |
|
**kwargs |
Any arguments to provide to the
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
VoiceConnection
|
A voice connection implementation of some sort. |
disconnect
async
#
disconnect(guild: SnowflakeishOr[PartialGuild]) -> None
Disconnect from a given guild.
PARAMETER | DESCRIPTION |
---|---|
guild |
The guild to disconnect from.
TYPE:
|