AutocompleteInteraction#respond takes a long time to return
my code:
and the output:
This means that just calling
AutocompleteInteraction#respond
is taking around 50 seconds to complete. The error is from the interaction taking longer than 3 seconds. I have quite limited memory available (512mb). What could the problem be and how can I fix it?12 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Post the full error stack trace, not just the top part!
- Show your code!
- Explain what exactly your issue is.
- Not a discord.js issue? Check out #useful-servers.
- Issue solved? Press the button!If it matters the command is also only deployed to the current guild, and not globally.
@jackssrt can u console.log the error in try...catch and send output here?
Maybe your internet connection has long ping? Only that request to dsicord API takes a long time, or some other?
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
- Note: if you initialize your Client as
bot
or other identifiers you need to use these instead of client
- If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebinthe output is now: https://hastebin.com/share/bugeherune.typescript
Hastebin
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
ive seen the time to respond go from like 6 seconds to now 2 minutes, it varies a lot
actually if you need to see more logs from when it starts: https://hastebin.com/share/teromurusa.csharp
Hastebin
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
respond-${i}
is only timing interaction.respond
, so only to the discord APIdoesnt always happen: https://hastebin.com/share/ibogocalul.typescript , https://hastebin.com/share/asuwusiyad.typescript
I am running the bot on replit so there is probably some firewall or proxy
Alright, I will look into it...