From 407af95d94b5efb43c6a1f0849d92098b1cb8090 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Thu, 17 Feb 2022 18:54:16 +1100 Subject: Discord.js gateway connection when connecting to voice will close 4002 decode error due to not sending self_video field. temp solution: remove it from server. this commit will probably be reverted later; I'm just trying to see if a proper ( not self signed ) SSL cert on slowcord.maddy.k.vu will fix this SSL error I'm receiving. --- gateway/src/schema/VoiceStateUpdateSchema.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gateway/src') diff --git a/gateway/src/schema/VoiceStateUpdateSchema.ts b/gateway/src/schema/VoiceStateUpdateSchema.ts index 9efa191e..c046600d 100644 --- a/gateway/src/schema/VoiceStateUpdateSchema.ts +++ b/gateway/src/schema/VoiceStateUpdateSchema.ts @@ -3,7 +3,7 @@ export const VoiceStateUpdateSchema = { $channel_id: String, self_mute: Boolean, self_deaf: Boolean, - self_video: Boolean, + $self_video: Boolean, //required in docs but bots don't always send it }; export interface VoiceStateUpdateSchema { @@ -11,5 +11,5 @@ export interface VoiceStateUpdateSchema { channel_id?: string; self_mute: boolean; self_deaf: boolean; - self_video: boolean; -} + self_video?: boolean; +} \ No newline at end of file -- cgit 1.5.1 From fac020f3fb89b499401c64703ac0100a0f9dfa31 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Tue, 8 Mar 2022 21:57:20 +1100 Subject: Added preferred_region optional property of VoiceStateUpdateSchema to allow electron client to connect to voice without crashing --- gateway/src/schema/VoiceStateUpdateSchema.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gateway/src') diff --git a/gateway/src/schema/VoiceStateUpdateSchema.ts b/gateway/src/schema/VoiceStateUpdateSchema.ts index c046600d..f6480414 100644 --- a/gateway/src/schema/VoiceStateUpdateSchema.ts +++ b/gateway/src/schema/VoiceStateUpdateSchema.ts @@ -4,6 +4,7 @@ export const VoiceStateUpdateSchema = { self_mute: Boolean, self_deaf: Boolean, $self_video: Boolean, //required in docs but bots don't always send it + $preferred_region: String, }; export interface VoiceStateUpdateSchema { @@ -12,4 +13,5 @@ export interface VoiceStateUpdateSchema { self_mute: boolean; self_deaf: boolean; self_video?: boolean; + preferred_region?: string; } \ No newline at end of file -- cgit 1.5.1