Webhook rate limit

Hi, my bot can't send webhook messages (promise not resolving) but using node-fetch it is sending them just fine. I thought there might be some issue with djs' rate limit handling for webhook endpoints but even after a full reboot, webhook messages are still not sending using webhook.send() which I find very weird, because manual sending using node-fetch just works without issues. Some additional information: - This happens every few days for at least an hour. - Initial interaction responses work fine - follow ups and reply edits don't. - Probably because initial responses are done using the interaction ( /api/interactions/...) endpoint. - And follow ups, etc. are done using the webhooks (/api/webhooks/...) endpoint. - Sending messages with bot owned and user owned webhooks both does not work. - After the "imaginary" rate limit ends, most recent webhook message sent attempts are executed Is this a known bug for v13 or am I missing something? As discord.js still refuses to send webhook messages after stopping and starting the application but sending the request to the raw endpoint myself works, I am really unsure what the issue is here. Any help appreciated.
11 Replies
d.js toolkit
d.js toolkit15mo 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!
Xge
XgeOP15mo ago
Thanks for the reply. That would take me longer than just writing a custom webhook rate limiter myself, especially because I have am using a self modified version of v13. As long as v13 is some how supported, I'd like to use it. So you think that this is a v13 bug? I'll definitely not be yelling haha, it is my fault that I have not updated to the latest version and I for sure will update over night if there's something happening that makes v13 unusable. I guess there is no solution to my issue right now other than updating to v14 or sending webhooks no longer through djs? If that's the case, I'll take a look at your migration guide to see again how easy it is to switch to v14. Thanks for the help so far. Hi again, thank you for saying that I should update to v14. It took a while to migrate everything but it is so much better now. My bot now starts within 2 minutes instead of 45 minutes. Code is much easier to read now as well. I am unsure if this fixed the webhook issue, I'll let you know if I have further issues. For now, all I can say is thank you.
souji
souji15mo ago
@xge hi, are you on big bot sharding? >150k guilds, that is
Xge
XgeOP15mo ago
My bot is since it is in about 140k guilds, yeah
souji
souji15mo ago
afaik bigbot sharding starts at 150
Xge
XgeOP15mo ago
Yup, I don't know why my bot was on big bot sharding before 150k. Why do you ask though?
souji
souji15mo ago
we have a channel for big bot specific issues, since we cannot easily test them, i'll add you
Xge
XgeOP15mo ago
Oh great, thank you. Do I use this channel to ask my question about my weird webhook rate limit issue in there, should it happen again?
DD
DD15mo ago
feel free if it seems tied to how large your bot is and soneone can try to have a looks-y though be weary if you modify internals or anything a bunch we cant really help you
Xge
XgeOP15mo ago
Alright, thanks! I did for v13 because stuff was not implemented as fast as I needed it, but I switched to v14 today and don't have anything modified as of now.
DD
DD15mo ago
great
Want results from more Discord servers?
Add your server