From 322970dda823b8bd0d77e3489377ccbf69b5aa17 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Sun, 28 Mar 2021 23:22:03 +0200 Subject: [PATCH] types: add VoiceState type --- src/types/voices/voice_state.ts | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/types/voices/voice_state.ts diff --git a/src/types/voices/voice_state.ts b/src/types/voices/voice_state.ts new file mode 100644 index 000000000..1c36d1021 --- /dev/null +++ b/src/types/voices/voice_state.ts @@ -0,0 +1,31 @@ +import { SnakeCaseProps } from "../util.ts"; + +export interface VoiceState { + /** The guild id this voice state is for */ + guildId?: string; + /** The channel id this user is connected to */ + channelId: string | null; + /** The user id this voice state is for */ + userId: string; + /** The guild member this voice state is for */ + member?: GuildMember; + /** The session id for this voice state */ + sessionId: string; + /** Whether this user is deafened by the server */ + deaf: boolean; + /** Whether this user is muted by the server */ + mute: boolean; + /** Whether this user is locally deafened */ + selfDeaf: boolean; + /** Whether this user is locally muted */ + selfMute: boolean; + /** Whether this user is streaming using "Go Live" */ + selfStream?: boolean; + /** Whether this user's camera is enabled */ + selfVideo: boolean; + /** Whether this user is muted by the current user */ + suppress: boolean; +} + +/** https://discord.com/developers/docs/resources/voice#voice-state-object-voice-state-structure */ +export type DiscordVoiceState = SnakeCaseProps;