mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01: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:
@@ -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) {
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user