Summary
InteractionModalSubmit does not currently expose modal select submit data (role/channel selects) in a usable typed way.
Discord modal submit payloads can include wrapped components (type: 18) containing select components (type: 6 role, type: 8 channel) with selected values and resolved objects.
Current state in discordgo
ModalSubmitInteractionData currently exposes:
CustomID
Components []MessageComponent
This works for text inputs, but modal select submissions do not provide an equivalent typed access path to selected values/resolved entities like other interaction data.
Proposed change (low-level mapping only)
Extend modal submit data mapping so users can read, from modal submit payloads:
- inner component
custom_id
- selected
values
- optional
resolved data (roles/channels/users/members)
Keep backward compatibility for text-input modals and avoid adding high-level helpers.
Notes
If this direction is OK, I can open a PR against master with tests for:
- role select inside modal submit
- channel select inside modal submit
- existing text input modal submit behavior unchanged
Summary
InteractionModalSubmitdoes not currently expose modal select submit data (role/channel selects) in a usable typed way.Discord modal submit payloads can include wrapped components (
type: 18) containing select components (type: 6role,type: 8channel) with selectedvaluesandresolvedobjects.Current state in discordgo
ModalSubmitInteractionDatacurrently exposes:CustomIDComponents []MessageComponentThis works for text inputs, but modal select submissions do not provide an equivalent typed access path to selected values/resolved entities like other interaction data.
Proposed change (low-level mapping only)
Extend modal submit data mapping so users can read, from modal submit payloads:
custom_idvaluesresolveddata (roles/channels/users/members)Keep backward compatibility for text-input modals and avoid adding high-level helpers.
Notes
If this direction is OK, I can open a PR against
masterwith tests for: