Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Commit 8b7f6a2

Browse files
committed
fix(bot): update language and channel message keys for consistency
1 parent 936d42c commit 8b7f6a2

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

apps/bot/src/config-functions/miscConfig.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
StringSelectMenuInteraction,
66
} from "discord.js";
77
import { GuildWithLogs, updateGuildConfig } from "@repo/database";
8-
import { dynamicChannel, dynamicMessage, waitForMessageComponent } from "./utils.js";
8+
import { dynamicMessage, waitForMessageComponent } from "./utils.js";
99
import { localeFlags } from "@constants";
1010
import { TFunction } from "i18next";
1111

@@ -42,7 +42,6 @@ export async function miscConfig(interaction: ChatInputCommandInteraction<"cache
4242
if (!messageComponent) return;
4343
switch (messageComponent.values[0]) {
4444
case "language":
45-
await messageComponent.deferUpdate();
4645
await languageConfig(messageComponent, guildData, t);
4746
break;
4847
case "modMailMessage":
@@ -76,11 +75,10 @@ async function languageConfig(interaction: StringSelectMenuInteraction<"cached">
7675
const actionRow = new ActionRowBuilder<StringSelectMenuBuilder>().setComponents(selectMenu);
7776
const messageComponent = await waitForMessageComponent(interaction, actionRow, t, "language");
7877
if (!messageComponent) return;
79-
await messageComponent.deferUpdate();
8078
await updateGuildConfig(messageComponent.guildId, {
8179
language: messageComponent.values[0],
8280
});
83-
const new_t = client.i18next.getFixedT(messageComponent.values[0], null, "misc_config");
81+
const new_t = client.i18next.getFixedT(messageComponent.values[0], null, "miscConfig");
8482
await messageComponent.editReply({
8583
content: new_t("language.set", { language: localeFlags[messageComponent.values[0]] }),
8684
components: [],

apps/bot/src/config-functions/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export async function dynamicChannel(
7676
const actionRow = new ActionRowBuilder<ChannelSelectMenuBuilder>().setComponents(selectMenu);
7777

7878
const result = await interaction.editReply({
79-
content: t("channel_initial"),
79+
content: t("channelInitial"),
8080
components: [actionRow],
8181
});
8282

0 commit comments

Comments
 (0)