modal followUp
https://sourceb.in/FIp4Pynb89
the 1st image is when the else statement is ran and it follows up the modal and the reply is sent successfully,
and the 2nd image is when the if statement is ran but the follow up to the modal isn't sent properly, and shows that error (image 3)
i'm not doing anything to the modal in the if statement, just following up like in the if statement, why isn't it replying?
10 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
is
modal.followUp
means showing the modal?? 🤔
i'm showing the modal in both cases and then followUp to the modalYou have just received modal submit interaction and didn't response with initial reply. You should response with initial reply before followUp.
Should i do
modal.reply
then?
When i do modal.reply
, it shows the error in image 1
And when i do modal.followUp
, it shows the error in image 2Are you deferring the reply after receiving the modal?
.reply() is only possible without deferring and only once.
.followUp() is only possible after deferring or sending the first reply.
No you might be doing that, but you most likely didn't resolve the promise from each call properly, so one might run before the other call, even tho the order is correct.
yes, this is all the things i'm doing: https://sourceb.in/cgJYTvzf9i,
the save button is clicked, i create the modal, set the inputs of it and then show the modal,
then i dothen if/else statement is ran, both in if/else statement, i'm doing
modal.followUp
as i deffered it just above,
it works proper in else statement, but when if statement is ran, it doesn't followUp properly,
image 2 else statement was ran,
image 3 if statement was ranlike I said, you are not waiting for the promise of deferReply() to resolve
Also you dont use .reply() after deferring
oh, should i add a wait of 1 sec?
no?
slap await before deferReply
aah
that i did by mistake but got the same problem
works now
i forgot to add await 💀
thanks for the help :D