12 Replies
d.js toolkit
d.js toolkit3mo ago
- 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! - Marked as resolved by OP
d.js docs
d.js docs3mo ago
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
treble/luna
treble/luna3mo ago
You have 2 interactionCreate listeners doing the same thing Consider using a proper interaction handler so you dont end up with a clusterfuck of code, resulting in issues like this
thaferra
thaferraOP3mo ago
https://sourceb.in/scPmb8Rjyn // Errore durante l'esecuzione del comando: DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:730:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async BurstHandler.runRequest (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:835:23) at async _REST.request (/home/container/node_modules/discord.js/node_modules/@discordjs/rest/dist/index.js:1278:22) at async ChatInputCommandInteraction.deferReply (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:71:5) at async Client.<anonymous> (/home/container/index.js:497:7) { requestBody: { files: undefined, json: { type: 5, data: [Object] } }, rawError: { message: 'Unknown interaction', code: 10062 }, code: 10062, status: 404, method: 'POST', url: 'https://discord.com/api/v10/interactions/1279075172766453851/aW50ZXJhY3Rpb246MTI3OTA3NTE3Mjc2NjQ1Mzg1MTpQbENIVWpHWHdNanNZYTNZQ1hHNk45akx1dTE3MG52ejlxdlNRQnppQjdkMjBtd2tnbU1hNGtwUExWa3FHYzFHWDFOTGtIMG13OEpqRm5lRkNwTlM0QlBlVTdvZ3Btelh0YzgwdDkzNWI0SG16U1lheTRlZzRaZGhVMkZkd1ZQZg/callback' } node:events:491 throw er; // Unhandled 'error' event ^ Error [InteractionNotReplied]: The reply to this interaction has not been sent or deferred. at ChatInputCommandInteraction.followUp (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:187:64) at Client.<anonymous> (/home/container/index.js:502:27) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:394:10) at process.processTicksAndRejections (node:internal/process/task_queues:84:21) { code: 'InteractionNotReplied' } now i have this other problem
treble/luna
treble/luna3mo ago
My answer is still the same .
thaferra
thaferraOP3mo ago
then I wouldn't know what to do How do I put it all together?
d.js docs
d.js docs3mo ago
:guide: Creating Your Bot: Event handling read more
treble/luna
treble/luna3mo ago
Your command handling is ok You just dont need to do it twice
thaferra
thaferraOP3mo ago
now i have this problem when i try to do a command the only one that works is clearCommand but the console give me also this error //// https://sourceb.in/R7yjxQeniN
No description
thaferra
thaferraOP3mo ago
select menus, modal, and button work at least
thaferra
thaferraOP3mo ago
ok, now my clearCommand works, but my anonCommand shows the same error sent in the photo above, I send the pingCommand, it doesn't work and the console shows no errors. furthermore, when I execute all 3 commands the bot always responds like this, even if the command works or not
No description
thaferra
thaferraOP3mo ago
resolved, ty so much
Want results from more Discord servers?
Add your server