Interaction responses very slow on Raspberry Pi

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?
6 Replies
d.js toolkit
d.js toolkit6mo 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!
Bob16077777
Bob160777776mo ago
14.14.1, but I have tried earlier versions of 14
Bob16077777
Bob160777776mo ago
looks to be around 200ms i logged this directly before the interaction.deferReply() at the top of the command file
No description
Bob16077777
Bob160777776mo ago
then a few seconds later it errored with Unknown Interaction, so it seems that djs is having some delay somewhere for me? 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)
Elnu
Elnu6mo ago
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
Bob16077777
Bob160777776mo ago
how would I go about doing that? I did some more experimenting with timestamps and it looks like it just takes a long time to send things to the api
No description