From a27ba1a72281b2473dd98568c121fc2ef3289406 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 20 Mar 2024 01:16:00 -0400 Subject: [PATCH] Fix join --- commands/util-voice/join.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/util-voice/join.js b/commands/util-voice/join.js index e07a2022..bd656924 100644 --- a/commands/util-voice/join.js +++ b/commands/util-voice/join.js @@ -1,5 +1,5 @@ const Command = require('../../framework/Command'); -const { joinVoiceChannel } = require('@discordjs/voice'); +const { joinVoiceChannel, getVoiceConnection } = require('@discordjs/voice'); module.exports = class JoinCommand extends Command { constructor(client) { @@ -22,7 +22,7 @@ module.exports = class JoinCommand extends Command { return msg.reply('I\'m missing the "Connect", "Speak", or "View Channel" permission for this channel.'); } if (!voiceChannel.joinable) return msg.reply('Your voice channel is not joinable.'); - if (this.client.voice.connections.has(voiceChannel.guild.id)) { + if (getVoiceConnection(voiceChannel.guild.id)) { return msg.reply('I am already in a voice channel.'); } joinVoiceChannel({