mirror of
https://github.com/danbulant/discord.js
synced 2026-06-24 17:21:59 +00:00
Voice event fixes (#482)
* Fix false voiceSwitch event * Check channelIDs instead of names
This commit is contained in:
parent
c63c39eb1f
commit
a102490b08
1 changed files with 1 additions and 1 deletions
|
|
@ -192,7 +192,7 @@ export default class Server extends Equality {
|
||||||
channel.members.add(user);
|
channel.members.add(user);
|
||||||
user.voiceChannel = channel;
|
user.voiceChannel = channel;
|
||||||
|
|
||||||
if (oldChannel.id) {
|
if (oldChannel.id && channel.id !== oldChannel.id) {
|
||||||
this.client.emit("voiceLeave", oldChannel, user);
|
this.client.emit("voiceLeave", oldChannel, user);
|
||||||
this.client.emit("voiceSwitch", oldChannel, channel, user);
|
this.client.emit("voiceSwitch", oldChannel, channel, user);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue