This commit is contained in:
Dragon Fire
2024-03-20 16:21:48 -04:00
parent 355304797d
commit d97fa2f9d9
+2 -2
View File
@@ -16,7 +16,7 @@ module.exports = class JoinCommand extends Command {
});
}
async run(msg) {
run(msg) {
const voiceChannel = msg.member.voice.channel;
if (!voiceChannel) return msg.reply('Please enter a voice channel first.');
if (!voiceChannel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK', 'VIEW_CHANNEL'])) {
@@ -29,7 +29,7 @@ module.exports = class JoinCommand extends Command {
joinVoiceChannel({
channelId: voiceChannel.id,
guildId: voiceChannel.guild.id,
adapterCreator: voiceChannel.guild.voiceAdapterCreator,
adapterCreator: voiceChannel.guild.voiceAdapterCreator
});
this.client.dispatchers.set(msg.guild.id, new Dispatcher(voiceChannel));
return msg.reply(`Joined **${voiceChannel.name}**!`);