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)
- property guild: PartialGuild | None¶
The partial guild of the voice state, if available.
- property member: PartialMember | PartialUser¶
The partial user/member of the state.
- property channel: PartialChannel | None¶
The partial channel of the state, if available
- 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_id=None)¶
Bases:
PartialVoiceStateRepresents a voice state object.
- Parameters:
state (DiscordAPI)
data (dict)
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
- request_to_speak_timestamp: datetime | None¶
The timestamp when the user requested to speak, if any.
- property user: PartialUser¶
The user this voice state belongs to. Resolved live from cache.
- property guild: PartialGuild | None¶
The guild this voice state is in, if any. Resolved live from cache.
- property channel: BaseChannel | PartialChannel | None¶
The voice channel this user is in, if any. Resolved live from cache.