guild checks

This commit is contained in:
Erik 2020-08-04 12:35:48 +03:00
parent 592f7ec60c
commit 0695420dc7
2 changed files with 2 additions and 2 deletions

View File

@ -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) });
}

View File

@ -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}`)}`);
}