Voice¶
discord_http.voice module¶
- class discord_http.voice.PartialVoiceState(*, state, id, channel_id=None, guild_id=None)¶
Bases:
PartialBaseRepresents a partial voice state object.
- Parameters:
state (DiscordAPI)
id (int)
channel_id (int | None)
guild_id (int | None)
- async fetch() VoiceState¶
Fetches the voice state of the member.
- Return type:
- 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:
PartialVoiceStateRepresents a voice state object.
- Parameters:
state (DiscordAPI)
data (dict)
guild (PartialGuild | None)
channel (BaseChannel | PartialChannel | None)
- user: PartialUser¶
The user this voice state belongs to.
- channel: BaseChannel | PartialChannel | None¶
The voice channel this user is in, if any.
- guild: PartialGuild | None¶
The guild this voice state is in, if any.
- async fetch() VoiceState¶
Fetches the voice state of the member.
- Return type:
- 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