Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Khaaz committed May 12, 2019
2 parents 2e708e5 + a1c2633 commit b335bce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Structures/MessageHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ class MessageHandler {
}

/** Admin override */
if (msg.content.startsWith(this.axon.params.ownerPrefix) && this.axon.AxonUtils.isBotOwner(msg.author.id) ) { // Owner override everything
if (msg.content.startsWith(this.axon.params.ownerPrefix) && !!this.axon.AxonUtils.isBotOwner(msg.author.id) ) { // Owner override everything
this._onAdmin(msg, guildConf, true);
return;
} if (msg.content.startsWith(this.axon.params.adminPrefix) && this.axon.AxonUtils.isBotAdmin(msg.author.id) ) { // ADMIN override everything except owner
} if (msg.content.startsWith(this.axon.params.adminPrefix) && !!this.axon.AxonUtils.isBotAdmin(msg.author.id) ) { // ADMIN override everything except owner
this._onAdmin(msg, guildConf, false);
return;
}
Expand Down Expand Up @@ -124,7 +124,7 @@ class MessageHandler {
* @memberof AxonClient
*/
_onAdmin(msg, guildConf, isOwner) {
msg.prefix = this.axon.params.adminPrefix;
msg.prefix = !isOwner ? this.axon.params.adminPrefix : this.axon.params.ownerPrefix;

const args = msg.content.replace(/<@!/g, '<@').substring(msg.prefix.length).split(' ');
const label = args.shift().toLowerCase();
Expand Down

0 comments on commit b335bce

Please sign in to comment.