summary refs log tree commit diff
path: root/src/opcodes/VoiceStateUpdate.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-18 22:04:29 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-18 22:04:29 +0200
commitda08497a19ab0635a8bd78e499cfc61e54352dcc (patch)
tree7fcda3b1ebca8e8a902c066945e02206b089fe51 /src/opcodes/VoiceStateUpdate.ts
parentMerge branch 'master' of https://github.com/discord-open-source/discord-gateway (diff)
downloadserver-da08497a19ab0635a8bd78e499cfc61e54352dcc.tar.xz
:construction: WIP member list + voice
Diffstat (limited to 'src/opcodes/VoiceStateUpdate.ts')
-rw-r--r--src/opcodes/VoiceStateUpdate.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/opcodes/VoiceStateUpdate.ts b/src/opcodes/VoiceStateUpdate.ts

index 584cbfd0..f2230cd9 100644 --- a/src/opcodes/VoiceStateUpdate.ts +++ b/src/opcodes/VoiceStateUpdate.ts
@@ -1,5 +1,13 @@ +import { VoiceStateUpdateSchema } from "../schema/VoiceStateUpdate.ts"; import { CLOSECODES, Payload } from "../util/Constants"; import WebSocket from "../util/WebSocket"; +import { check } from "./instanceOf"; +// TODO: implementation +// TODO: check if a voice server is setup +// TODO: save voice servers in database and retrieve them +// Notice: Bot users respect the voice channel's user limit, if set. When the voice channel is full, you will not receive the Voice State Update or Voice Server Update events in response to your own Voice State Update. Having MANAGE_CHANNELS permission bypasses this limit and allows you to join regardless of the channel being full or not. -export function onVoiceStateUpdate(this: WebSocket, data: Payload) {} +export function onVoiceStateUpdate(this: WebSocket, data: Payload) { + check.call(this, VoiceStateUpdateSchema, data.d); +}