When running a bot on my raspberry pi, all discord.js interaction response methods (.reply(), .deferReply(), etc) run very slowly and cause the interaction to time out. Through seeing when parts of my code are reached, I've narrowed it down to the aforementioned methods--everything runs nearly instantaneously reaching the part where it should actually send a response. Running the code from my PC works perfectly and pinging the discord api from the pi has normal response times, so I don't think it's a local network issue. Has anyone ever had a similar issue/know how to solve it?
#Interaction responses very slow on Raspberry Pi
12 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- 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!
What djs version?
14.14.1, but I have tried earlier versions of 14
console.log(interaction.createdTimestamp) and Date.now() to determine whether the issue is the time it takes to receive or to reply to the interaction
looks to be around 200ms
i logged this directly before the interaction.deferReply() at the top of the command file
then a few seconds later it errored with Unknown Interaction, so it seems that djs is having some delay somewhere for me?
Do you await the deferReply? And could you add a rateLimited listener to client.rest and a debug listener to client?