fix: no misuse promises, actually respond to interaction
Node.js CI / Lint and Test (push) Successful in 56s

This commit is contained in:
2025-09-27 17:36:56 -07:00
parent fb291e0865
commit e11bb24c2b
2 changed files with 8 additions and 7 deletions
+4 -7
View File
@@ -27,21 +27,18 @@ veluna.discord.once(Events.ClientReady, () => {
); );
}); });
// eslint-disable-next-line @typescript-eslint/no-misused-promises -- Top-level await. veluna.discord.on(Events.InteractionCreate, (interaction) => {
veluna.discord.on(Events.InteractionCreate, async(interaction) => {
if (!interaction.inCachedGuild()) { if (!interaction.inCachedGuild()) {
return; return;
} }
if (interaction.isButton()) { if (interaction.isButton()) {
await handleButton(veluna, interaction); void handleButton(veluna, interaction);
return;
} }
if (interaction.isModalSubmit()) { if (interaction.isModalSubmit()) {
await handleModalSubmit(veluna, interaction); void handleModalSubmit(veluna, interaction);
return;
} }
if (interaction.isChatInputCommand()) { if (interaction.isChatInputCommand()) {
await handleChatCommand(veluna, interaction); void handleChatCommand(veluna, interaction);
} }
}); });
+4
View File
@@ -104,4 +104,8 @@ export const handleChatCommand = async(
serverId: guild.id, serverId: guild.id,
}, },
}); });
await interaction.editReply({
content: `This server's ${commandName} channel has been set to <#${channel.id}>.`,
});
}; };