Open mvromanov opened 1 day ago
SubVoiceStateUpdate, SubSpeakingStart and SubSpeakingStop methods are not working.
Errors in the browser console looks like this:
args: "1194387531916128352" cmd: "SUBSCRIBE" evt: "SPEAKING_START"
code: 4000 message: "Invalid subscription parameters provided"
The reason for this error is the invalid format of the argument passed to discordSdk.subscribe() method:
if (args == "channel_id") args = discordSdk!.channelId;
should be replaced with this:
if (args.hasOwnProperty("channel_id")) { args.channel_id = discordSdk!.channelId; }
Reference to the Discord example: https://github.com/discord/embedded-app-sdk-examples/blob/main/sdk-playground/packages/client/src/pages/VoiceState.tsx#L18
Hi and thanks for opening the issue! This should be fixed in 223635a344f6a8caa520e5a55983ecbc93a29544 (Unity 1.1.4, NPM 1.2.1)
1.1.4
1.2.1
Let me know if it keeps happening 🙏
SubVoiceStateUpdate, SubSpeakingStart and SubSpeakingStop methods are not working.
Errors in the browser console looks like this:
args: "1194387531916128352" cmd: "SUBSCRIBE" evt: "SPEAKING_START"
code: 4000 message: "Invalid subscription parameters provided"
The reason for this error is the invalid format of the argument passed to discordSdk.subscribe() method:
should be replaced with this:
Reference to the Discord example: https://github.com/discord/embedded-app-sdk-examples/blob/main/sdk-playground/packages/client/src/pages/VoiceState.tsx#L18