|
5 | 5 | StringSelectMenuInteraction, |
6 | 6 | } from "discord.js"; |
7 | 7 | import { GuildWithLogs, updateGuildConfig } from "@repo/database"; |
8 | | -import { dynamicChannel, dynamicMessage, waitForMessageComponent } from "./utils.js"; |
| 8 | +import { dynamicMessage, waitForMessageComponent } from "./utils.js"; |
9 | 9 | import { localeFlags } from "@constants"; |
10 | 10 | import { TFunction } from "i18next"; |
11 | 11 |
|
@@ -42,7 +42,6 @@ export async function miscConfig(interaction: ChatInputCommandInteraction<"cache |
42 | 42 | if (!messageComponent) return; |
43 | 43 | switch (messageComponent.values[0]) { |
44 | 44 | case "language": |
45 | | - await messageComponent.deferUpdate(); |
46 | 45 | await languageConfig(messageComponent, guildData, t); |
47 | 46 | break; |
48 | 47 | case "modMailMessage": |
@@ -76,11 +75,10 @@ async function languageConfig(interaction: StringSelectMenuInteraction<"cached"> |
76 | 75 | const actionRow = new ActionRowBuilder<StringSelectMenuBuilder>().setComponents(selectMenu); |
77 | 76 | const messageComponent = await waitForMessageComponent(interaction, actionRow, t, "language"); |
78 | 77 | if (!messageComponent) return; |
79 | | - await messageComponent.deferUpdate(); |
80 | 78 | await updateGuildConfig(messageComponent.guildId, { |
81 | 79 | language: messageComponent.values[0], |
82 | 80 | }); |
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"); |
84 | 82 | await messageComponent.editReply({ |
85 | 83 | content: new_t("language.set", { language: localeFlags[messageComponent.values[0]] }), |
86 | 84 | components: [], |
|
0 commit comments