1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +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) {
try {
const error = instanceOf(schema, data);
const error = instanceOf(schema, data, { path: "body" });
if (error !== true) {
throw error;
}

View File

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