Update i18n (and fix commands)

This commit is contained in:
Isaac
2021-04-27 11:34:34 +01:00
parent 0991a48d3d
commit fba2b579fb
10 changed files with 31 additions and 21 deletions

View File

@@ -61,6 +61,9 @@ module.exports = class CommandManager {
* @param {Message} message - Command message
*/
async handle(message) {
let settings = await message.guild.settings;
const i18n = this.client.i18n.getLocale(settings.locale);
let is_blacklisted = false;
if (settings.blacklist.includes(message.author.id)) {
is_blacklisted = true;
@@ -82,10 +85,6 @@ module.exports = class CommandManager {
}
}
let settings = await message.guild.settings;
const i18n = this.client.i18n.get(settings.locale);
const prefix = settings.command_prefix;
const escaped_prefix = prefix.toLowerCase().replace(/(?=\W)/g, '\\'); // (lazy) escape every character so it can be used in a RexExp
const client_mention = `<@!?${this.client.user.id}>`;