Unknown interaction error when responding to RateLimitError

So I've been running into this very annoying Unknown interaction bug, randomly triggering when I get rate limited on changing a channel. When I say triggering randomly, I mean sometimes it catches the error perfectly fine (rejecting and triggering my error response), and sometimes it crashes the bot. I don't know if I've overlooked something obvious (and honestly, I hope that's the case). I looked around in this channel a bit and I've seen the common causes tag, but: - This error gets thrown immediately, it isn't because I'm responding too slow - I'm not using a collector - There's only a single process handling this interaction I've been using this bot skeleton for years, but I've never ran into this kind of problem before, so I'm almost absolutely certain that there's no overlapping interaction events or such. Relevant pieces of code linked below. Interaction handler: https://github.com/MayberryZoom/dread-bot/blob/main/dread-bot.js#L92 Command body: https://github.com/MayberryZoom/dread-bot/blob/main/commands/channel.js#L41 Line triggering the error: https://github.com/MayberryZoom/dread-bot/blob/main/commands/channel.js#L56
4 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!
Michiru
MichiruOP15mo ago
(thought I could use code blocks in the post name lol) To re-iterate/clarify, this error is triggering on any given use of the command when rate limited. It can be the first time after a bot restart, it doesn't matter how spaced out the interactions are, it could be the 2nd or 5th time it's used since a restart, etc. but it should be throwing an error, which I should then catch and reject, no? I did
Michiru
MichiruOP15mo ago
unless I misunderstood and did something wrong?
No description
Michiru
MichiruOP15mo ago
ah.. fair point that feels really obvious in retrospect. thank you lol
Want results from more Discord servers?
Add your server