Check ownerOnly before guildOnly and dmOnly
This commit is contained in:
parent
5bb87ef1ba
commit
85e79913a4
1 changed files with 1 additions and 1 deletions
|
@ -150,9 +150,9 @@ export class CommandClient extends Client implements CommandClientOptions {
|
|||
guild: msg.guild
|
||||
}
|
||||
|
||||
if (command.ownerOnly === true && !this.owners.includes(msg.author.id)) return this.emit('commandOwnerOnly', ctx, command)
|
||||
if (command.guildOnly === true && msg.guild === undefined) return this.emit('commandGuildOnly', ctx, command)
|
||||
if (command.dmOnly === true && msg.guild !== undefined) return this.emit('commandDmOnly', ctx, command)
|
||||
if (command.ownerOnly === true && !this.owners.includes(msg.author.id)) return this.emit('commandOwnerOnly', ctx, command)
|
||||
|
||||
if (command.botPermissions !== undefined && msg.guild !== undefined) {
|
||||
// TODO: Check Overwrites too
|
||||
|
|
Loading…
Reference in a new issue