Voice

discord_http.voice module

class discord_http.voice.PartialVoiceState(*, state, id, channel_id=None, guild_id=None)

Bases: PartialBase

Represents a partial voice state object.

Parameters:
id

The ID of the user this voice state belongs to

Type:

int

channel_id

The ID of the voice channel this user is in, if any

Type:

int | None

guild_id

The ID of the guild this voice state is in, if any

Type:

int | None

async edit(*, suppress=<MISSING>) None

Updates the voice state of the member.

Parameters:

suppress (bool) – Whether to suppress the user

Return type:

None

async fetch() VoiceState

Fetches the voice state of the member.

Return type:

VoiceState

Returns:

The voice state of the member

Raises:

NotFound

  • If the member is not in the guild - If the member is not in a voice channel

class discord_http.voice.VoiceState(*, state, data, guild, channel)

Bases: PartialVoiceState

Represents a voice state object.

Parameters:
session_id

The session ID of the voice state

Type:

str

user

The user this voice state belongs to

Type:

PartialUser

member

The member this voice state belongs to, if any

Type:

Member | None

channel

The voice channel this user is in, if any

Type:

BaseChannel | PartialChannel | None

guild

The guild this voice state is in, if any

Type:

PartialGuild | None

deaf

Whether the user is deafened by the server

Type:

bool

mute

Whether the user is muted by the server

Type:

bool

self_deaf

Whether the user is deafened by themselves

Type:

bool

self_mute

Whether the user is muted by themselves

Type:

bool

self_stream

Whether the user is streaming

Type:

bool

self_video

Whether the user is using video

Type:

bool

suppress

Whether the user is suppressed by the server

Type:

bool

request_to_speak_timestamp

The timestamp when the user requested to speak, if any

Type:

datetime | None