Interaction already replied on slash command?
When the slash command is ran again, the old interaction is received (which is why it errors). How?
25 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!
- ✅
Marked as resolved by OPEach call is separate, and each interaction is unique, if you only call that function when someone uses the command, then that shouldn't be the case, you may be replying to it somewhere else in your code, showing the full error might help
-
DiscordAPIError: Interaction has already been acknowledged
- [InteractionAlreadyReplied]: The reply to this interaction has already been sent or deferred.
You have already replied to the interaction.
- Use <Interaction>.followUp()
to send a new message
- If you deferred reply it's better to use <Interaction>.editReply()
- Responding to slash commands / message componentsThe function is only being called when the command is ran, or at least I think
I'm using the same function for something else, too but that shouldn't matter?
nvm i reread what you said, but still don't quite understand
What is app.js line 22?
It's the module for "app.post"
let me show
line 22 is the getResult function (action(request)) in the other script
You maybe calling the same function on the same interaction twice somewhere, make sure you do not do that
I'm not sure how
kick player is the only command currently
when you say "same function", do you mean app.post or the getResult function?
either, both would produce the same result
What would be '/result'
post
request? That would trigger the getResult everytime a post request is made to that endpoint, so that's not idealYes, but that /result post request should only be sent once
like
this is roblox
it should only be sent once
and then the express app post should end
oh my god
hold on
nevermind
You found your issue then?
not yet
but i'm trying something
Hmm, then ig make sure you are not replying to the interaction somewhere else or calling the said function(s) more than once somewhere
sadly nope
alright
is the .end() not correct?
I see
true, I could rename it
app.post here has to do with the express webapp
basically, the app.post function within the other script is supposed to create the connection and then remove it
I'm positive.
I even changed the names just now to try
fixed it by not using a function to create that app.post event
smh
thanks