Skip to content

Modal submit data: expose select components (role/channel) and values #1705

@ADG08

Description

@ADG08

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions