Skip to content

Commit

Permalink
fix: followUp error if replied (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm-ayf authored May 25, 2024
1 parent a391a88 commit 2a0abdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ client.on(Events.InteractionCreate, async (interaction) => {
}
} catch (e) {
if (!(e instanceof ReplyableError)) console.error(e);
await interaction.reply(ReplyableError.from(e).toReply());
await interaction[interaction.replied ? "followUp" : "reply"](
ReplyableError.from(e).toReply(),
);
}
});

Expand Down

0 comments on commit 2a0abdc

Please sign in to comment.