From e7258233cd7d41b254b50de215e98a35a0687031 Mon Sep 17 00:00:00 2001 From: Navy Date: Sun, 24 May 2020 12:55:22 +0300 Subject: [PATCH] sth --- language/LocaleLoader.js | 2 +- language/languages/en_us/settings/en_us_moderation.lang | 3 ++- structure/client/Resolver.js | 4 +++- structure/client/components/settings/moderation/Modlogs.js | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/language/LocaleLoader.js b/language/LocaleLoader.js index e986c42..07c1423 100644 --- a/language/LocaleLoader.js +++ b/language/LocaleLoader.js @@ -57,7 +57,7 @@ class LocaleLoader { let text = ''; for(const line of lines) { if(line.startsWith('//')) continue; - const matches = line.match(/\[([_A-Z0-9]{1,})\]/giu); + const matches = line.match(/\[([_A-Z0-9]{1,})\]/iu); if(matches) { if (matched) { parsed[matched] = text; diff --git a/language/languages/en_us/settings/en_us_moderation.lang b/language/languages/en_us/settings/en_us_moderation.lang index 3a6ece6..6ae0181 100644 --- a/language/languages/en_us/settings/en_us_moderation.lang +++ b/language/languages/en_us/settings/en_us_moderation.lang @@ -26,7 +26,7 @@ The followin infraction types will now be logged: //CHATLOGS SETTING -[S_CHATLOGS_DESCRIPTION] +[S_MESSAGELOGS_DESCRIPTION] Configure message logging for your server. [S_CHATLOGS_ROLES_LIST] @@ -65,6 +65,7 @@ Successfully reset the chatlogs setting. [S_MUTE_DESCRIPTION] Assign or create a muted role and choose mute functionality for your guild. + __Mute Types__ **`0`:** Mutes only add/remove the muted role. *(default)* **`1`:** Mutes remove all roles except for the muted role. diff --git a/structure/client/Resolver.js b/structure/client/Resolver.js index 1a8436a..c29286e 100644 --- a/structure/client/Resolver.js +++ b/structure/client/Resolver.js @@ -46,10 +46,11 @@ class Resolver { * @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 + * @param {Function} resolver One of the resolver functions used to resolve the passed values into objects (should always be one of the mass resolver due to the nature of this method, might break otherwise) * @returns {Object} * @memberof Resolver */ - resolveMethod(args, valid, existing = []) { + resolveMethod(args, valid, existing = [], resolver) { const methods = { list: ['view', 'list', '?'], @@ -69,6 +70,7 @@ class Resolver { } if (methods.list.includes(method)) { + if(resolver) return { method: 'list' }; } else if (methods.add.includes(method)) { const added = []; diff --git a/structure/client/components/settings/moderation/Modlogs.js b/structure/client/components/settings/moderation/Modlogs.js index 4f285fd..9d2a8b2 100644 --- a/structure/client/components/settings/moderation/Modlogs.js +++ b/structure/client/components/settings/moderation/Modlogs.js @@ -18,7 +18,6 @@ class Modlogs extends Setting { ], guarded: true, resolve: 'GUILD', - index: 'modlogs', examples: [ 'modlogs ', 'modlogs #moderation-log',