Interaction already replied on slash command?

When the slash command is ran again, the old interaction is received (which is why it errors). How?
No description
No description
25 Replies
d.js toolkit
d.js toolkit8mo 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! - Marked as resolved by OP
NyR
NyR8mo ago
Each 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
d.js docs
d.js docs8mo ago
- 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 components
Swyftey
SwyfteyOP8mo ago
No description
Swyftey
SwyfteyOP8mo ago
The 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?
Swyftey
SwyfteyOP8mo ago
No description
Swyftey
SwyfteyOP8mo ago
nvm i reread what you said, but still don't quite understand
NyR
NyR8mo ago
What is app.js line 22?
Swyftey
SwyfteyOP8mo ago
It's the module for "app.post" let me show
Swyftey
SwyfteyOP8mo ago
No description
Swyftey
SwyfteyOP8mo ago
line 22 is the getResult function (action(request)) in the other script
NyR
NyR8mo ago
You maybe calling the same function on the same interaction twice somewhere, make sure you do not do that
Swyftey
SwyfteyOP8mo ago
I'm not sure how
Swyftey
SwyfteyOP8mo ago
No description
Swyftey
SwyfteyOP8mo ago
kick player is the only command currently when you say "same function", do you mean app.post or the getResult function?
NyR
NyR8mo ago
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 ideal
Swyftey
SwyfteyOP8mo ago
Yes, but that /result post request should only be sent once like
Swyftey
SwyfteyOP8mo ago
No description
Swyftey
SwyfteyOP8mo ago
this is roblox it should only be sent once and then the express app post should end oh my god hold on nevermind
NyR
NyR8mo ago
You found your issue then?
Swyftey
SwyfteyOP8mo ago
not yet but i'm trying something
NyR
NyR8mo ago
Hmm, then ig make sure you are not replying to the interaction somewhere else or calling the said function(s) more than once somewhere
Swyftey
SwyfteyOP8mo ago
sadly nope alright is the .end() not correct? I see true, I could rename it
Swyftey
SwyfteyOP8mo ago
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
Want results from more Discord servers?
Add your server