guildOnly should still include owner

This commit is contained in:
Dragon Fire
2024-03-24 15:00:12 -04:00
parent 79d2c12dc9
commit dd12aa7db7
+4 -4
View File
@@ -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;