This commit is contained in:
nolan 2020-05-23 23:50:35 -04:00
parent e5ed7298af
commit 28884f5d5d
5 changed files with 10 additions and 10 deletions

View File

@ -7,7 +7,7 @@ switch({component}) {
"setting";
break;
case "inhibitor":
"inhibitor":
"inhibitor";
break;
}

View File

@ -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

View File

@ -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 = [];

View File

@ -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;
}
}

View File

@ -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) {