guild checks
This commit is contained in:
parent
592f7ec60c
commit
0695420dc7
@ -17,7 +17,7 @@ class Disabled extends Inhibitor {
|
||||
execute(message, command) {
|
||||
|
||||
if(command.disabled) return super._fail({ modifier: message.format('I_DISABLED_ERRORMODIFIER', { globally: true }, true) });
|
||||
if(message.guild._settings.disabledCommands.includes(command.resolveable)) {
|
||||
if(message.guild && message.guild._settings.disabledCommands.includes(command.resolveable)) {
|
||||
return super._fail({ modifier: message.format('I_DISABLED_ERRORMODIFIER', { globally: false }, true) });
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ const Message = Structures.extend('Message', (Message) => {
|
||||
|
||||
async resolve() {
|
||||
|
||||
if(this.guild.debug) {
|
||||
if(this.guild && this.guild.debug) {
|
||||
this.guild._debugLog(`Command [${this.command.moduleResolveable}] execution by ${this.author.tag}. Parameters: ${this.parameters.join(', ')} || Arguments: ${Object.values(this.arguments).map((arg) => `${arg.name}:${arg.value}`)}`);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user