diff --git a/structure/client/components/settings/administration/IgnoreChannels.js b/structure/client/components/settings/administration/IgnoreChannels.js index 37df71c..befaf91 100644 --- a/structure/client/components/settings/administration/IgnoreChannels.js +++ b/structure/client/components/settings/administration/IgnoreChannels.js @@ -43,7 +43,7 @@ class IgnoreSetting extends Setting { const setting = message.guild._settings[this.index]; const { guild } = message; const { resolver } = this.client; - const response = await resolver.resolveMethod(params, null, setting.channels, resolver.resolveChannels.bind(resolver), guild); + const response = await resolver.resolveMethod(params, null, setting.channels, { resolver: resolver.resolveChannels.bind(resolver), guild }); if (!response) method = params.shift(); else ({ method } = response); @@ -93,7 +93,7 @@ class IgnoreSetting extends Setting { } else if (method === 'bypass') { - const response = await resolver.resolveMethod(params, null, setting.roleBypass, resolver.resolveRoles.bind(resolver), guild); + const response = await resolver.resolveMethod(params, null, setting.roleBypass, { resolver: resolver.resolveRoles.bind(resolver), guild }); if (response.method === 'add') { diff --git a/structure/client/components/settings/moderation/MessageLog.js b/structure/client/components/settings/moderation/MessageLog.js index 91ca349..37e537d 100644 --- a/structure/client/components/settings/moderation/MessageLog.js +++ b/structure/client/components/settings/moderation/MessageLog.js @@ -55,7 +55,7 @@ class MessageLogsSetting extends Setting { msg: message.format('MISSING_ARGS'), error: true }; - const response = await this.resolveMethod(args, undefined, setting.ignoredRoles, guild.resolveRoles.bind(guild)); + const response = await this.resolveMethod(args, undefined, setting.ignoredRoles, { resolver: guild.resolveRoles.bind(guild) }); if (response) { @@ -102,7 +102,7 @@ class MessageLogsSetting extends Setting { msg: message.format('MISSING_ARGS'), error: true }; - const response = await this.resolveMethod(args, null, setting.ignoredChannels, guild.resolveChannels.bind(guild)); + const response = await this.resolveMethod(args, null, setting.ignoredChannels, { resolver: guild.resolveChannels.bind(guild) }); if (response) { diff --git a/structure/client/components/settings/moderation/Protection.js b/structure/client/components/settings/moderation/Protection.js index 0e01d74..418e473 100644 --- a/structure/client/components/settings/moderation/Protection.js +++ b/structure/client/components/settings/moderation/Protection.js @@ -52,7 +52,7 @@ class ProtectionSetting extends Setting { } else { - const response = await resolver.resolveMethod(params, null, setting.roles, resolver.resolveRoles.bind(resolver), guild); + const response = await resolver.resolveMethod(params, null, setting.roles, { resolver: resolver.resolveRoles.bind(resolver), guild }); if (!response) return { error: true, msg: message.format('ERR_INVALID_METHOD', { method }) }; ({ method } = response); if (method !== 'list' && !response.resolved.length) return { error: true, msg: message.format('ERR_ROLERESOLVE') }; diff --git a/structure/client/components/settings/utility/Autorole.js b/structure/client/components/settings/utility/Autorole.js index 5f63abd..cf680c5 100644 --- a/structure/client/components/settings/utility/Autorole.js +++ b/structure/client/components/settings/utility/Autorole.js @@ -33,7 +33,10 @@ class AutoroleSetting extends Setting { const setting = message.guild._settings[this.index]; const { guild } = message; const { resolver } = this.client; - const response = await resolver.resolveMethod(params, null, setting.roles, resolver.resolveRoles.bind(resolver), guild); + const response = await resolver.resolveMethod(params, null, setting.roles, { + resolver: resolver.resolveRoles.bind(resolver), + guild + }); let index = null, langParams = {}; diff --git a/structure/client/components/settings/utility/StickyRole.js b/structure/client/components/settings/utility/StickyRole.js index 30357df..7d88ff1 100644 --- a/structure/client/components/settings/utility/StickyRole.js +++ b/structure/client/components/settings/utility/StickyRole.js @@ -37,7 +37,10 @@ class StickyRoleSetting extends Setting { const langParams = {}; let index = null; - const response = await resolver.resolveMethod(params, null, setting.roles, resolver.resolveRoles.bind(resolver), guild); + const response = await resolver.resolveMethod(params, null, setting.roles, { + resolver: resolver.resolveRoles.bind(resolver), + guild + }); if (!response) return { error: true, msg: message.format('ERR_INVALID_METHOD', { method: params[0] }) diff --git a/structure/interfaces/Setting.js b/structure/interfaces/Setting.js index ddca886..8e9ddb3 100644 --- a/structure/interfaces/Setting.js +++ b/structure/interfaces/Setting.js @@ -64,8 +64,8 @@ class Setting extends Component { * @returns {Object} * @memberof Resolver */ - resolveMethod(args, valid, existing, resolver, guild, caseSensitive) { - return this.client.resolver.resolveMethod(args, valid, existing, resolver, guild, caseSensitive); + resolveMethod(args, valid, existing, opts) { + return this.client.resolver.resolveMethod(args, valid, existing, opts); } reason(executor) { @@ -125,9 +125,9 @@ class Setting extends Component { return { author: { - name: `${this.name}${this.module ? ` (${this.module.resolveable})` : ''}` + name: `${this.display}${this.module ? ` (${this.module.resolveable})` : ''}` }, - description: stripIndents`\`${prefix}setting ${this.name}${this.usage ? ` ${this.usage}` : ''}\`${this.guildOnly ? ' *(guild-only)*' : ''} + description: stripIndents`\`${prefix}setting ${this.display}${this.usage ? ` ${this.usage}` : ''}\`${this.guildOnly ? ' *(guild-only)*' : ''} ${message.format(this.description)}`, fields };