vb2007 / discordbot

A simple discord bot of mine developed with node.js's discord.js library.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Bug: bot fails to handle interactions under 3 seconds #93

Open vb2007 opened 1 month ago

vb2007 commented 1 month ago

Apparently, the Discord API returns an error if a bot fails to handle an interaction under 3 seconds.

So the command's executor just sees an error message, when the interaction actually got executed on the server where the bot runs, and for example; changes have been made to the database.

To handle this, things like deferred responses can be implemented: https://discordjs.guide/slash-commands/response-methods.html#deferred-responses

And maybe this function (using normal responses / deferred responses) can even be configurable later on by the bot's runner.