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, async(interaction) => {
veluna.discord.on(Events.InteractionCreate, (interaction) => {
if (!interaction.inCachedGuild()) {
return;
}
if (interaction.isButton()) {
await handleButton(veluna, interaction);
return;
void handleButton(veluna, interaction);
}
if (interaction.isModalSubmit()) {
await handleModalSubmit(veluna, interaction);
return;
void handleModalSubmit(veluna, interaction);
}
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,
},
});
await interaction.editReply({
content: `This server's ${commandName} channel has been set to <#${channel.id}>.`,
});
};