mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
guildOnly should still include owner
This commit is contained in:
+4
-4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user