mirror of
https://github.com/danbulant/discord.js
synced 2026-06-08 09:13:22 +00:00
fix(VoiceConnection): use Speaking#has to fire _stoppedSpeaking (#2896)
* Use match on speaking bitmask to fire _stoppedSpeaking * Use constants and correct matching * Correctly do a not check
This commit is contained in:
parent
e189c1b728
commit
2ba00038d1
1 changed files with 2 additions and 2 deletions
|
|
@ -447,12 +447,12 @@ class VoiceConnection extends EventEmitter {
|
||||||
*/
|
*/
|
||||||
if (this.status === VoiceStatus.CONNECTED) {
|
if (this.status === VoiceStatus.CONNECTED) {
|
||||||
this.emit('speaking', user, speaking);
|
this.emit('speaking', user, speaking);
|
||||||
if (!speaking) {
|
if (!speaking.has(Speaking.FLAGS.SPEAKING)) {
|
||||||
this.receiver.packets._stoppedSpeaking(user_id);
|
this.receiver.packets._stoppedSpeaking(user_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (guild && user && old !== speaking) {
|
if (guild && user && !old.equals(speaking)) {
|
||||||
const member = guild.member(user);
|
const member = guild.member(user);
|
||||||
if (member) {
|
if (member) {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue