From ae8ce8eeadb68de25aa84d678cbe02f9aa800e39 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 13 Jul 2022 16:34:26 +0300 Subject: [PATCH] misc fixes & cleanup --- src/localization/en_gb/observers/en_gb_commandHandler.lang | 3 +++ src/structure/client/LocaleLoader.js | 6 +++++- src/structure/components/observers/CommandHandler.js | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/localization/en_gb/observers/en_gb_commandHandler.lang b/src/localization/en_gb/observers/en_gb_commandHandler.lang index a183e55..9a18016 100644 --- a/src/localization/en_gb/observers/en_gb_commandHandler.lang +++ b/src/localization/en_gb/observers/en_gb_commandHandler.lang @@ -8,6 +8,9 @@ This command can only be run in servers. [O_COMMANDHANDLER_TYPEINTEGER] The command option {option} requires an integer between `{min}` and `{max}`. +[O_COMMANDHANDLER_TYPETIME] +The command option {option} requires a timestring (e.g. 5 min, 2w). + [O_COMMANDHANDLER_TYPEUSERS] The command option {option} requires users. diff --git a/src/structure/client/LocaleLoader.js b/src/structure/client/LocaleLoader.js index f0bf6f4..8ea556c 100644 --- a/src/structure/client/LocaleLoader.js +++ b/src/structure/client/LocaleLoader.js @@ -31,7 +31,11 @@ class LocaleLoader { if (!this.languages[language]) return `< Missing Locale: ${language} >`; let string = this.languages[language][index]; - if (!string) return `< Missing Locale Index: ${language}.${index} >`; + if (!string) { + const str = `< Missing Locale Index: ${language}.${index} >`; + this.logger.error(str); + return str; + } for (const emoji of Object.keys(Emojis)) parameters[`emoji_${emoji}`] = Emojis[emoji]; diff --git a/src/structure/components/observers/CommandHandler.js b/src/structure/components/observers/CommandHandler.js index 7bfe39c..831d363 100644 --- a/src/structure/components/observers/CommandHandler.js +++ b/src/structure/components/observers/CommandHandler.js @@ -202,7 +202,7 @@ class CommandHandler extends Observer { // }); const newOption = matched.clone(option.value); const parsed = await this._parseOption(interaction, newOption); - console.log(parsed); + // console.log(parsed); if(parsed.error) { error = {