From a7d61cfd54da15a5c2b143ab196ec802bc456f44 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 5 May 2020 17:07:44 -0400 Subject: [PATCH] Reply in join/leave --- commands/voice/join.js | 10 ++++++---- commands/voice/leave.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/commands/voice/join.js b/commands/voice/join.js index b9dea00b..3923fc71 100644 --- a/commands/voice/join.js +++ b/commands/voice/join.js @@ -15,12 +15,14 @@ module.exports = class JoinCommand extends Command { async run(msg) { const voiceChannel = msg.member.voice.channel; - if (!voiceChannel) return msg.say('Please enter a voice channel first.'); + if (!voiceChannel) return msg.reply('Please enter a voice channel first.'); if (!voiceChannel.permissionsFor(this.client.user).has(['CONNECT', 'SPEAK', 'VIEW_CHANNEL'])) { - return msg.say('I am missing the "Connect", "Speak", or "View Channel" permission for this voice channel.'); + 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)) { + return msg.reply('I am already in a voice channel.'); } - if (!voiceChannel.joinable) return msg.say('Your voice channel is not joinable.'); - if (this.client.voice.connections.has(voiceChannel.guild.id)) return msg.say('I am already in a voice channel.'); await voiceChannel.join(); return msg.reply(`Joined **${voiceChannel.name}**!`); } diff --git a/commands/voice/leave.js b/commands/voice/leave.js index caa31428..6b2457dd 100644 --- a/commands/voice/leave.js +++ b/commands/voice/leave.js @@ -15,7 +15,7 @@ module.exports = class LeaveCommand extends Command { run(msg) { const connection = this.client.voice.connections.get(msg.guild.id); - if (!connection) return msg.say('I am not in a voice channel.'); + if (!connection) return msg.reply('I am not in a voice channel.'); connection.channel.leave(); return msg.reply(`Left **${connection.channel.name}**...`); }