A certain command crashes the bot.
Logged in as The Bretain#4008
Connected to MongoDB
Registered global application commands: travailler, balance, givebadge, classement, badge
/home/runner/The-Bretane/node_modules/discord.js/src/rest/RequestHandler.js:350
throw new DiscordAPIError(data, res.status, request);
^
DiscordAPIError: Unknown interaction
at RequestHandler.execute (/home/runner/The-Bretane/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/runner/The-Bretane/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async CommandInteraction.reply (/home/runner/The-Bretane/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:103:5) {
method: 'post',
path: '/interactions/1142867758304997578/aW50ZXJhY3Rpb246MTE0Mjg2Nzc1ODMwNDk5NzU3ODpEQm5BR3c2Z3lzb1ZPZWlYaVkxNWEyNkRITmJ4dnI3OWJ3OWFpTHg5RUFpM0xzcmdTT2Vkb2w1UXlxNEhGSUpJUGdTR0FSSzJESnpFUE9YVFd4dTBYYUpHS3dqWlpiM1U3dG1OWm1Od0JadkZnUjRDeTlxYTN0cnJ1NmxDejMxRQ/callback',
code: 10062,
httpStatus: 404,
requestData: {
json: {
type: 4,
data: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
title: 'Work Result',
type: 'rich',
description: 'You earned 17 Sablé! :Sablaie:',
url: null,
timestamp: null,
color: 65280,
fields: [],
thumbnail: null,
image: null,
author: null,
footer: null
}
],
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
}
},
files: []
}
}
repl process died unexpectedly: exit status 1"
Is my code the problem?
3 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!So when I use the "badge" command, the bot crashes.
first line = Project is running!
Common causes of
DiscordAPIError[10062]: Unknown interaction
:
- Initial response took more than 3 seconds ➞ defer the response *.
- Wrong interaction object inside a collector.
- Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance)
* Note: you cannot defer modal or autocomplete value responses