fix(Player): don't change connection channel when random user joins

This commit is contained in:
Hubert 2021-09-13 18:15:27 +02:00 committed by HKGx
parent 7ac777b2f6
commit 16484f461b

View file

@ -76,7 +76,7 @@ class Player extends EventEmitter<PlayerEvents> {
const queue = this.getQueue(oldState.guild.id);
if (!queue) return;
if (oldState.channelId && newState.channelId && oldState.channelId !== newState.channelId) {
if (oldState.channelId && newState.channelId && oldState.channelId !== newState.channelId && newState.member.id === newState.guild.me.id) {
if (queue?.connection) queue.connection.channel = newState.channel;
}