diff --git a/structure/interfaces/Setting.js b/structure/interfaces/Setting.js index 626cdcd..adeccad 100644 --- a/structure/interfaces/Setting.js +++ b/structure/interfaces/Setting.js @@ -47,13 +47,26 @@ class Setting extends Component { return { parsedArguments: response.parsedArguments, params: response.newArgs, error: false }; } + /** + * Resolves methods used primarily for settings, also deals with appending the arguments into existing lists + * + * @param {Array} args The incoming arguments with the first element being the method ex. ['add','ban','kick'] + * @param {Array} valid An array of items to compare to, if an argument doesn't exist in this array it'll be skipped over + * @param {Array} [existing=[]] Existing values in the array, valid elements will be appended to this + * @returns {Object} + * @memberof Resolver + */ + resolveMethod(args, valid, existing) { + return this.client.resolver.resolveMethod(args, valid, existing); + } + reason(executor) { return `[${this.moduleResolveable}] Executed by ${executor.tag} (${executor.id}).`; } async _handleReset(message) { await message.guild._removeSettings(this.index); - const msg = message.format('GENERAL_SETTINGRESET', { setting: this.resolveable }); + const msg = message.format('GENERAL_SETTINGRESET', { setting: this.name.toLowerCase() }); return { error: false, msg