the submitreview button is only becoming available after i submit all the 4 inputs and resubmit sum
{
postInfoFilled: false,
paymentInfoFilled: false,
lastSelectedChannel: false,
lastSelectedSchedule: 'per-task'
}
{
postInfoFilled: false,
paymentInfoFilled: false,
lastSelectedChannel: 'hiring-builder',
lastSelectedSchedule: 'per-task'
}
{
postInfoFilled: true,
paymentInfoFilled: false,
lastSelectedChannel: 'hiring-builder',
lastSelectedSchedule: 'per-task'
}
{
postInfoFilled: true,
paymentInfoFilled: true,
lastSelectedChannel: 'hiring-builder',
lastSelectedSchedule: 'per-task'
}
{
postInfoFilled: true,
paymentInfoFilled: true,
lastSelectedChannel: 'hiring-builder',
lastSelectedSchedule: 'upon-completion'
}
its only becoming available in the last log, it should be becoming available before that, idk how i could fix this :/
13 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 OPi do the await after every submit
if you weren't specifically ignoring
InteractionAlreadyReplied
errors, you'd probably see that you're receiving one of these errors after every component interaction before submitting
as the error code/message implies, you cannot respond to an interaction more than once
<Interaction>.update()
is a response to the interaction
therefore calling update
then calling updateSubmitButtonState
(where update
is called again) will error
the submit button is therefore only updating after the next component interaction (before updateSubmitButtonState
is called again)
in future, consider not silently ignoring your errorsthank you for the input ❤️
i removed the rest as i think its redundant but... i still dont get a way how to fix this needing a subsequent input after getting all input set 😦
Are you still calling this function after updating the message?
am doing it before, how should i do it? am kinda dumb ngl
Doing it before is correct, just that you weren't doing so previously
What do your logs look like?
If you log
isSubmitEnabled
directly, is it correct for each interaction?after tons of fiddling i got to this and it works well now
ig i just forgot to actually update the button state when its called... so it was only updating after doing a subsequent input