Dannie
DIAdiscord.js - Imagine an app
•Created by Dannie on 8/18/2023 in #djs-questions
InteractionResponse#awaitMessageComponent is not working with modal
https://gist.github.com/danthonywalker/c369f391b8524388866ac9a74f4e9e44
So the flow goes like this
1)
showQuestionModal
is called, which displays the modal and handles submission logic
2) let response = modalInteraction.reply
is called, which contains buttons
3) response.awaitMessageComponent
never calls into the filter
After a bit of debugging I have found that in the collect
function of InteractionCollector
the following condition always fails:
let response = modalInteraction.reply
returns a different interaction ID, than the one interaction.message?.interaction?.id
is returning. Particularly, interaction.message?.interaction?.id
is returning the interaction ID of my original slash command and not the modal interaction ID.14 replies