mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-13 06:02:39 +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) {
|
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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user