mirror of
https://github.com/danbulant/discord.js
synced 2026-06-04 15:21:22 +00:00
voice: account for speaking now being a bitmask
This commit is contained in:
parent
1f7c1ddaa2
commit
9296a30148
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue