From def329bf679dc4ca59a4e5a77d8eac997422d3bf Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 21 Jul 2022 23:01:54 +0200 Subject: [PATCH] silently ignore when local isn't found --- src/utils/locales.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/locales.ts b/src/utils/locales.ts index 079db2e..472d7c2 100644 --- a/src/utils/locales.ts +++ b/src/utils/locales.ts @@ -49,10 +49,9 @@ export const getLocale = (client: Client, text: string) => { const str = locale.get(text) ?? client.locales.get(client.config.default_lang)?.get(text); - if (str === undefined) { - throw 'Missing locales'; + if (str !== undefined) { + data[lang] = str.toLowerCase(); } - data[lang] = str.toLowerCase(); }); return data;