mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 02:23:31 +01:00
voice: account for speaking now being a bitmask
This commit is contained in:
@@ -137,7 +137,7 @@ class VoiceConnection extends EventEmitter {
|
|||||||
this.sockets.ws.sendPacket({
|
this.sockets.ws.sendPacket({
|
||||||
op: VoiceOPCodes.SPEAKING,
|
op: VoiceOPCodes.SPEAKING,
|
||||||
d: {
|
d: {
|
||||||
speaking: this.speaking,
|
speaking: this.speaking ? 1 : 0,
|
||||||
delay: 0,
|
delay: 0,
|
||||||
ssrc: this.authentication.ssrc,
|
ssrc: this.authentication.ssrc,
|
||||||
},
|
},
|
||||||
@@ -426,6 +426,7 @@ class VoiceConnection extends EventEmitter {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onSpeaking({ user_id, ssrc, speaking }) {
|
onSpeaking({ user_id, ssrc, speaking }) {
|
||||||
|
speaking = Boolean(speaking);
|
||||||
const guild = this.channel.guild;
|
const guild = this.channel.guild;
|
||||||
const user = this.client.users.get(user_id);
|
const user = this.client.users.get(user_id);
|
||||||
this.ssrcMap.set(+ssrc, user);
|
this.ssrcMap.set(+ssrc, user);
|
||||||
|
|||||||
Reference in New Issue
Block a user