mojira-discord-bot
mojira-discord-bot copied to clipboard
Invalid commands cause the bot to not respond
The Bug
When running the command:
/search query:-1
the bot does not respond, with the following error message:
[ERROR] SlashCommandExecutor - DiscordAPIError[10062]: Unknown interaction
at SequentialHandler.runRequest (/home/mojiradiscordbot/mojira-discord-bot/node_modules/discord.js/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:287:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (/home/mojiradiscordbot/mojira-discord-bot/node_modules/discord.js/node_modules/@discordjs/rest/dist/lib/handlers/SequentialHandler.cjs:99:14)
at async REST.request (/home/mojiradiscordbot/mojira-discord-bot/node_modules/discord.js/node_modules/@discordjs/rest/dist/lib/REST.cjs:52:22)
at async ChatInputCommandInteraction.reply (/home/mojiradiscordbot/mojira-discord-bot/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:110:5)
at async SearchCommand.run (file:///home/mojiradiscordbot/mojira-discord-bot/bin/src/commands/SearchCommand.js:53:13)
at async Object.execute (file:///home/mojiradiscordbot/mojira-discord-bot/bin/src/commands/commandHandlers/SlashCommandRegister.js:26:39)
at async Client.InteractionEventHandler.onEvent (file:///home/mojiradiscordbot/mojira-discord-bot/bin/src/events/interaction/InteractionEventHandler.js:13:21) {
rawError: { message: 'Unknown interaction', code: 10062 },
code: 10062,
status: 404,
method: 'POST',
url: 'https://discord.com/api/v10/interactions/[...]/[...]/callback',
requestBody: { files: [], json: { type: 4, data: [Object] } }
}