From fb291e08654dae481b5256da535c98cd7f043d7e Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Sat, 27 Sep 2025 17:34:07 -0700 Subject: [PATCH] fix: misuse the promise --- src/index.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3b0f6ee..8e140dc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,18 +27,21 @@ veluna.discord.once(Events.ClientReady, () => { ); }); -veluna.discord.on(Events.InteractionCreate, (interaction) => { +// eslint-disable-next-line @typescript-eslint/no-misused-promises -- Top-level await. +veluna.discord.on(Events.InteractionCreate, async(interaction) => { if (!interaction.inCachedGuild()) { return; } if (interaction.isButton()) { - void handleButton(veluna, interaction); + await handleButton(veluna, interaction); + return; } if (interaction.isModalSubmit()) { - void handleModalSubmit(veluna, interaction); + await handleModalSubmit(veluna, interaction); + return; } if (interaction.isChatInputCommand()) { - void handleChatCommand(veluna, interaction); + await handleChatCommand(veluna, interaction); } });