diff --git a/framework/Client.js b/framework/Client.js index 32d89e3d..98c6eebc 100644 --- a/framework/Client.js +++ b/framework/Client.js @@ -66,6 +66,10 @@ module.exports = class CommandClient extends Client { return; } } + if (command.guildOnly && !msg.guild) { + await msg.reply(`The \`${command.name}\` command can only be used in a server channel.`); + return; + } if (!this.isOwner(msg.author)) { if (!command._enabled) { await msg.reply(`The \`${command.name}\` command is disabled.`); @@ -75,10 +79,6 @@ module.exports = class CommandClient extends Client { await msg.reply(`The \`${command.name}\` command can only be used by the bot owner.`); return; } - if (command.guildOnly && !msg.guild) { - await msg.reply(`The \`${command.name}\` command can only be used in a server channel.`); - return; - } if (command.nsfw && !msg.channel.nsfw) { await msg.reply(`The \`${command.name}\` command can only be used in NSFW channels.`); return;