feat: more strings

This commit is contained in:
TrèsAbhi committed 2024-03-09 12:01:41 -06:00
1 parent 8e216ebe46
commit 9840982aa2
4 files changed
+10 -7

No files matched your search

@@ -13,6 +13,7 @@ import buttonLink from '../../../core/discord/buttonLink';
import embedWarning from '../../../core/discord/embedWarning';
import normalizeInteractionReturnable from '../../../core/discord/normalizeInteractionReturnable';
import { psa } from '../../../core/discord/psa';
import { translator } from '../../../core/localization/translator';
import { UserError } from '../../../hooks/userError';
export default async function handleChatInputCommand(
@@ -107,10 +108,11 @@ export default async function handleChatInputCommand(
interaction.followUp(followUp);
}
} catch (error) {
const { t } = translator(interaction.locale);
const components = [
new ActionRowBuilder<ButtonBuilder>().addComponents(
new ButtonBuilder()
.setLabel('Get Help on Discord Server')
.setLabel(t`bot.common.errors.get_help`)
.setURL('https://discord.gg/nDt7AjGJQH')
.setStyle(ButtonStyle.Link),
),
@@ -125,8 +127,7 @@ export default async function handleChatInputCommand(
console.error(interaction.commandName, error);
interaction.editReply({
content:
"# Blitzkrieg ran into an error!\nWe're so sorry about this. Feel free to [join the official Discord server](https://discord.gg/nDt7AjGJQH) to get help.",
content: t`bot.common.errors.uncaught_error`,
components,
});
}