Replying to interactions that wait for modal submission

I may be approaching this wrong, but I haven't found a successful combination of deferring/replying/updating for when an interaction is submitted that displays a modal and awaits the modal submission.

My issue is when the user submits the interaction, I can't defer or reply to the interaction before calling .showModal(...) on it, otherwise I get an error stating that the interaction has already been replied to. Once the modal is displayed, I'm calling .awaitModalSubmit(...) on the interaction, which returns a ModalSubmitInteraction. It seems as though the modal submit interaction returned isn't tied to the original interaction, so if replied to, it generates a new message in Discord, leaving the original interaction in the Sending command... state. If I instead follow up or edit the original interaction, the modal submit interaction gets stuck in a an un-replied state.

Is there a way to a) have the modal submission not generate a second message, but instead update the original one? or b) satisfy both interactions so neither of them get stuck in a weird state?

I do also want to point out, that for uninteresting reasons, when replying to these messages, I'm calling through the webhook client to send responses, and not directly through the interaction itself.
Was this page helpful?