#Interaction responses very slow on Raspberry Pi

12 messages · Page 1 of 1 (latest)

wooden lichen
#

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?

vernal daggerBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • 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!
steep jolt
#

What djs version?

wooden lichen
#

14.14.1, but I have tried earlier versions of 14

steep jolt
#

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

wooden lichen
#

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?

steep jolt
#

Do you await the deferReply? And could you add a rateLimited listener to client.rest and a debug listener to client?

wooden lichen
#

yep I await it (and this happens with other commands too that don't defer), and I'll try the other listeners

#

it doesnt look like it's being rate limited (and like I said, when I run it on my PC it's normal)

normal tree
#

try sending a raw http request with ur body data

#

ping afaik is measured through websocket messages, so it might differ w doing send calls