From 73873c2bc5c545cb7e66599f56a28344c6d0869e Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Mon, 10 Feb 2025 14:14:39 -0800 Subject: [PATCH] feat: show user their locale when not supported --- src/i18n/responses.ts | 52 ++++++++++++++++++++-------------------- src/modules/translate.ts | 8 ++++--- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/i18n/responses.ts b/src/i18n/responses.ts index fd84667..0fdaaf9 100644 --- a/src/i18n/responses.ts +++ b/src/i18n/responses.ts @@ -15,7 +15,7 @@ export const responses: Record => { @@ -27,7 +27,7 @@ export const translate = async( return entitlement.userId === interaction.user.id && entitlement.isActive(); }); - if (!isEntitled && interaction.user.id !== "465650873650118659") { + if (!isEntitled) { await interaction.editReply({ content: i18n("subscription-required", targetLocale), }); @@ -35,7 +35,9 @@ export const translate = async( } if (!supportedLocales.includes(targetLocale)) { - await interaction.editReply(i18n("unsupported-locale", targetLocale)); + await interaction.editReply(i18n("unsupported-locale", targetLocale, { + target: targetLocale, + })); return; }