1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-13 06:02:39 +01:00

🐛 fix voicestate

This commit is contained in:
Flam3rboy 2021-08-10 00:15:31 +02:00
parent 7597d141b1
commit cfab1d34d1
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import WebSocket from "../util/WebSocket";
export function check(this: WebSocket, schema: any, data: any) { export function check(this: WebSocket, schema: any, data: any) {
try { try {
const error = instanceOf(schema, data); const error = instanceOf(schema, data, { path: "body" });
if (error !== true) { if (error !== true) {
throw error; throw error;
} }

View File

@ -1,5 +1,5 @@
export const VoiceStateUpdateSchema = { export const VoiceStateUpdateSchema = {
guild_id: String, $guild_id: String,
channel_id: String, channel_id: String,
self_mute: Boolean, self_mute: Boolean,
self_deaf: Boolean, self_deaf: Boolean,
@ -7,7 +7,7 @@ export const VoiceStateUpdateSchema = {
}; };
export interface VoiceStateUpdateSchema { export interface VoiceStateUpdateSchema {
guild_id: string; guild_id?: string;
channel_id: string; channel_id: string;
self_mute: boolean; self_mute: boolean;
self_deaf: boolean; self_deaf: boolean;