Unknown Interaction - @discordjs/core
I'm working on a bot that handles interactions via a webhook url, and am processing them in AWS Lambda. I have everything set up properly, including responding to the ping interaction, but no matter what I do, I keep getting an
Unknown Interaction
error.
In the above, I'm creating the apis from a custom context being passed in, and attempting to just respond to any non-ping interaction with 'Pong!', but every time the function is invoked, I get the following error:
Any idea what's going on?8 Replies
- 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!It's worth noting, the ping interaction verifies successfully.
Whats your performance like? You only have 3 seconds to complete a response to an interaction
Hmm, that's a good point. If an interaction times out, does it not exist anymore?
Essentially yes, theres a 3 seconds period n which Discord needs it to be acknowledged as successful, either defer to reply
Then the token remains active for 15 minutes for edits and followUps
If the lambda needs to spin up every time it might be a little slow
I'll have to dig into cloud trail or something to see what the response time is
That's probably it. I just hit the bot with 5 subsequent interactions, and the first 3 failed, but the last 2 didn't
Thanks for narrowing it down for me. I'll have to see what I can do to get spinup time to be lower
Instead of posting a new question, I want to follow up here. I'm having a similar issue from before, but now I'm getting an unknown webhook error.
The defer works perfectly fine, but after the timeout, when I try to edit the reply is when I get the error
I've also tried
interactions.followUp(...)
, but have the same resulteditReply
and all the other methods that use /webhooks
endpoints take the application id as the webhook id, not the interaction idThanks! That fixed it.