"The application is not responding"

Can someone tell me why my bot executes the command without any problem, but once this is done it responds with "The application is not responding", making it crash? ----------------------------- https://sourceb.in/rFX9WJdejO
No description
11 Replies
d.js toolkit
d.js toolkit7mo 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
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
thaferra
thaferraOP7mo ago
here's the error from my console: node:events:497 throw er; // Unhandled 'error' event ^ DiscordAPIError[10062]: Unknown interaction at handleErrors (/home/container/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/@discordjs/rest/dist/index.js:835:23) at async _REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1278:22) at async ChatInputCommandInteraction.reply (/home/container/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:114:5) at async Client.<anonymous> (/home/container/index.js:97:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:402:10) at process.processTicksAndRejections (node:internal/process/task_queues:84:21) { requestBody: { files: [], json: { type: 4, data: { content: 'Cancellati 3 messaggi.', tts: false, nonce: undefined, enforce_nonce: false, embeds: undefined, components: undefined, username: undefined, avatar_url: undefined, allowed_mentions: undefined, flags: 64, message_reference: undefined, attachments: undefined, sticker_ids: undefined, thread_name: undefined, applied_tags: undefined, poll: undefined } } }, rawError: { message: 'Unknown interaction', code: 10062 }, code: 10062, status: 404, method: 'POST', url: 'https://discord.com/api/v10/interactions/1239642665335652443/aW50ZXJhY3Rpb246MTIzOTY0MjY2NTMzNTY1MjQ0MzpzRU90eHlTQXlPTGNxY0dVUmdSMm52Y1N0WkRwY2dhMTUzQXhXaXplUXdtbzc3dmRTdGE4TnRNSjZkVTdDbjVWcGp1MnRTUVJVNHUzRnhNbkVFMmF5cDU0cVJJOHR2TlBNNGNHQkFHdm15dzlRcWE0TDJHTzdmdkJ4UnhMYjQ1OQ/callback' } Node.js v20.13.1 .
darp
darp7mo ago
you have 3 seconds to respond to interaction
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
d.js docs
d.js docs7mo ago
:method: ChatInputCommandInteraction#deferReply @14.15.2 Defers the reply to this interaction.
// Defer the reply to this interaction
interaction.deferReply()
.then(console.log)
.catch(console.error)
// Defer the reply to this interaction
interaction.deferReply()
.then(console.log)
.catch(console.error)
thaferra
thaferraOP7mo ago
I still have the same problem (I updated what I did in the sourcebin). Did I make the wrong .js to edit?
darp
darp7mo ago
this is not how you use deferReply you call it, do something, then followup:
await interaction.deferReply();
await expensiveOperation(); // say thats I/O that takes more than 3 seconds
await interaction.editReply('I did expensive operation');
await interaction.deferReply();
await expensiveOperation(); // say thats I/O that takes more than 3 seconds
await interaction.editReply('I did expensive operation');
brncray
brncray7mo ago
You can also interaction.editReply rather than following up
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
darp
darp7mo ago
well i dont use d.js now so i agree
Want results from more Discord servers?
Add your server