mirror of
https://github.com/Wessel/yorushika.git
synced 2026-06-08 22:28:27 +02:00
Fix locale and eval limit + escaping
This commit is contained in:
@@ -36,13 +36,13 @@ module.exports = class Eval extends DiscordCommand {
|
|||||||
catch (ex) { result = ex; errored = true; }
|
catch (ex) { result = ex; errored = true; }
|
||||||
finally {
|
finally {
|
||||||
if (silent) return message.edit(this.localize(msg.author.locale['developer']['eval']['silent']));
|
if (silent) return message.edit(this.localize(msg.author.locale['developer']['eval']['silent']));
|
||||||
result = this.sanitize(String(inspect(result)));
|
result = this.bot.util.escapeMarkdown(this.sanitize(String(inspect(result))));
|
||||||
|
|
||||||
message.edit({
|
message.edit({
|
||||||
content: '',
|
content: '',
|
||||||
embed: {
|
embed: {
|
||||||
color : (errored ? this.bot.col['developer']['eval']['failure'] : this.bot.col['developer']['eval']['success']),
|
color : (errored ? this.bot.col['developer']['eval']['failure'] : this.bot.col['developer']['eval']['success']),
|
||||||
description: this.localize(msg.author.locale['developer']['eval']['result'].join('\n'), { resultType: errored ? msg.author.locale['developer']['eval']['types'][1] : msg.author.locale['developer']['eval']['types'][0], resultMessage: this.bot.util.shorten(result, 1900) || '{}' })
|
description: this.localize(msg.author.locale['developer']['eval']['result'].join('\n'), { resultType: errored ? msg.author.locale['developer']['eval']['types'][1] : msg.author.locale['developer']['eval']['types'][0], resultMessage: this.bot.util.shorten(result, 1850) || '{}' })
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ module.exports = class LocaleRegistry {
|
|||||||
if (f.startsWith('strings')) {
|
if (f.startsWith('strings')) {
|
||||||
this.bot.locales.set(l['translation']['code'].toLowerCase(), l);
|
this.bot.locales.set(l['translation']['code'].toLowerCase(), l);
|
||||||
this.bot.localeDic.push(l['translation']['code']);
|
this.bot.localeDic.push(l['translation']['code']);
|
||||||
this.bot.localeMap.push(`${l['translation']['flag']} \`${l['translation']['code']}\` **:** ${l['translation']['orig']} (*${l['translation']['full']}*) \`[${l['translation']['progress']}%]\` {***${l['translation']['translator']['discord']['name']}#${l['translation']['translator']['discord']['discrim']}***}`);
|
this.bot.localeMap.push(`${l['translation']['flag']} \`${l['translation']['code']}\` **:** ${l['translation']['orig']} (*${l['translation']['full']}*) \`[${l['translation']['progress']}%]\` {***${l['translation']['translator']['discord'][0]['name']}#${l['translation']['translator']['discord'][0]['discrim']}***}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user