setting caller and response to resetting a setting

This commit is contained in:
Erik 2020-05-24 01:10:29 +03:00
parent 8926733af3
commit 5ee64d0f2f

View File

@ -73,7 +73,7 @@ class SettingsCommand extends Command {
} }
} }
setting._caller = target; message._settingCaller = target;
if(setting.resolve === 'GUILD' && !this._checkAdministrator(message)) return undefined; //does not have admin if(setting.resolve === 'GUILD' && !this._checkAdministrator(message)) return undefined; //does not have admin
const parameters = params.splice(1); const parameters = params.splice(1);
@ -83,7 +83,8 @@ class SettingsCommand extends Command {
} }
if(parameters.join(' ').toLowerCase() === 'reset') { if(parameters.join(' ').toLowerCase() === 'reset') {
return await setting._handleReset(message); const { msg } = await setting._handleReset(message);
return message.respond(msg, { emoji: 'success' });
} }
const response = await setting.handle(message, parameters); const response = await setting.handle(message, parameters);