79216787

Date: 2024-11-22 23:03:43
Score: 1
Natty:
Report link

Based on the code provided, the command handler doesn't defer or reply in a timely manner, and the unknown interaction error is a common error to receive if you continue executing code and don't respond within the 3 seconds window it expects. I would add a defer/reply code set to your execution handler. See: https://discord.js.org/docs/packages/discord.js/14.16.3/CommandInteraction:Class

you can also see examples of how to reply and/or defer here: https://discordjs.guide/creating-your-bot/command-handling.html#executing-commands

In general, I would defer at the first line of the handler, do your handling, and then reply at the end.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: G-Force