mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
🐛 fix voicestate
This commit is contained in:
parent
7597d141b1
commit
cfab1d34d1
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user