Check ownerOnly before guildOnly and dmOnly

This commit is contained in:
DjDeveloperr 2020-11-15 15:37:55 +05:30
parent 5bb87ef1ba
commit 85e79913a4
1 changed files with 1 additions and 1 deletions

View File

@ -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