From 28884f5d5df5b4a24cefb0620d5224b4874b56e1 Mon Sep 17 00:00:00 2001 From: nolan Date: Sat, 23 May 2020 23:50:35 -0400 Subject: [PATCH] merging --- language/languages/en_us/en_us_general.lang | 2 +- structure/client/components/commands/utility/Settings.js | 2 +- structure/client/components/observers/CommandHandler.js | 2 +- structure/extensions/Guild.js | 9 +++++---- structure/extensions/Message.js | 5 ++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/language/languages/en_us/en_us_general.lang b/language/languages/en_us/en_us_general.lang index 4ab3f3c..513d465 100644 --- a/language/languages/en_us/en_us_general.lang +++ b/language/languages/en_us/en_us_general.lang @@ -7,7 +7,7 @@ switch({component}) { "setting"; break; case "inhibitor": - "inhibitor": + "inhibitor"; break; } diff --git a/structure/client/components/commands/utility/Settings.js b/structure/client/components/commands/utility/Settings.js index 40e3bcb..c8b52e1 100644 --- a/structure/client/components/commands/utility/Settings.js +++ b/structure/client/components/commands/utility/Settings.js @@ -94,7 +94,7 @@ class SettingsCommand extends Command { _listSettings(message, type, all) { if(!message.guild && type === 'GUILD') type = 'USER'; - const prefix = message.guild?.prefix || this.client._options.bot.prefix; //eslint-disable-line parsing-error + const prefix = message.guild?.prefix; let fields = []; const sorted = this.client.registry.components diff --git a/structure/client/components/observers/CommandHandler.js b/structure/client/components/observers/CommandHandler.js index 3011192..ea5114f 100644 --- a/structure/client/components/observers/CommandHandler.js +++ b/structure/client/components/observers/CommandHandler.js @@ -51,7 +51,7 @@ class CommandHandler extends Observer { async _getCommand(message, [arg1, arg2, ...args]) { if(message.guild) await message.guild.settings(); - const prefix = message.guild?.prefix || this.client._options.bot.prefix; + const prefix = message.guild?.prefix; let command = null; let remains = []; diff --git a/structure/extensions/Guild.js b/structure/extensions/Guild.js index 0573475..8c3e9a7 100644 --- a/structure/extensions/Guild.js +++ b/structure/extensions/Guild.js @@ -127,7 +127,7 @@ const Guild = Structures.extend('Guild', (Guild) => { async resolveMember(member, strict) { - return await this.client.resolver.resolveMembers(member, this, strict); + return this.client.resolver.resolveMembers(member, this, strict); } @@ -145,13 +145,13 @@ const Guild = Structures.extend('Guild', (Guild) => { async resolveRoles(roles, strict = false) { - return await this.client.resolver.resolveRoles(roles, this, strict); + return this.client.resolver.resolveRoles(roles, this, strict); } async resolveRole(role, strict) { - return await this.client.resolver.resolveRole(role, this, strict); + return this.client.resolver.resolveRole(role, this, strict); } @@ -167,7 +167,8 @@ const Guild = Structures.extend('Guild', (Guild) => { } get prefix() { - return this._settings.prefix; + return this._settings.prefix + || this.client._options.bot.prefix; } } diff --git a/structure/extensions/Message.js b/structure/extensions/Message.js index efcbbb6..595e748 100644 --- a/structure/extensions/Message.js +++ b/structure/extensions/Message.js @@ -27,7 +27,7 @@ const Message = Structures.extend('Message', (Message) => { let language = 'en_us'; if(this.guild && this.guild._settings.locale) language = this.guild._settings.locale; - parameters.prefix = this.guild?.prefix || this.client._options.bot.prefix; + parameters.prefix = this.guild?.prefix; let template = this.client.localeLoader.template(language, index); //.languages[language][index]; if(!template) { @@ -125,8 +125,7 @@ const Message = Structures.extend('Message', (Message) => { ? comp : this.command; - const prefix = this.guild?.prefix - || this.client._options.bot.prefix; + const prefix = this.guild?.prefix; let fields = []; if(component.examples.length > 0) {