harmony/src/types/voiceTypes.ts
Catry 599997414b Add Types and Finish Endpoints (TODO: ENDPOINT #1)
Co-Authored-By: yky4589 <8479056+yky4589@users.noreply.github.com>
Co-Authored-By: Choi Minseo <minseo0388@outlook.com>
Co-Authored-By: Aki <akiacode@users.noreply.github.com>
2020-10-22 15:10:51 +09:00

44 lines
961 B
TypeScript

// https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice
enum VoiceOpcodes { // VoiceOpcodes 추가 - UnderC -
IDENTIFY = 0,
SELECT_PROTOCOL = 1,
READY = 2,
HEARTBEAT = 3,
SESSION_DESCRIPTION = 4,
SPEAKING = 6,
HEARTBEAT_ACK = 6,
RESUME = 7,
HELLO = 8,
RESUMED = 9,
CLIENT_DISCONNECT = 13,
}
enum VoiceCloseCodes {
UNKNOWN_OPCODE = 4001,
NOT_AUTHENTICATED = 4003,
AUTHENTICATION_FAILED = 4004,
ALREADY_AUTHENTICATED = 4005,
SESSION_NO_LONGER_VALID = 4006,
SESSION_TIMEOUT = 4009,
SERVER_NOT_FOUNT = 4011,
UNKNOWN_PROTOCOL = 4012,
DISCONNECTED = 4014,
VOICE_SERVER_CRASHED = 4015,
UNKNOWN_ENCRYPTION_MODE = 4016,
}
interface VoiceState {
guild_id?: string
channel_id: string | undefined
user_id: string
member?: GuildMember
session_id: string
deaf: boolean
mute: boolean
self_deaf: boolean
self_mute: boolean
self_stream?: boolean
self_video: boolean
suppress: boolean
}