mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Voice event fixes (#482)
* Fix false voiceSwitch event * Check channelIDs instead of names
This commit is contained in:
@@ -192,7 +192,7 @@ export default class Server extends Equality {
|
||||
channel.members.add(user);
|
||||
user.voiceChannel = channel;
|
||||
|
||||
if (oldChannel.id) {
|
||||
if (oldChannel.id && channel.id !== oldChannel.id) {
|
||||
this.client.emit("voiceLeave", oldChannel, user);
|
||||
this.client.emit("voiceSwitch", oldChannel, channel, user);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user