Skip to content

Conversation

@Lulalaby
Copy link
Contributor

No description provided.

@Lulalaby Lulalaby requested a review from a team as a code owner September 10, 2025 20:19
@Lulalaby Lulalaby requested review from abe-discord and removed request for a team September 10, 2025 20:19
@Paillat-dev
Copy link
Contributor

Yes I approve

@Soheab
Copy link

Soheab commented Sep 10, 2025

LGTM

@anthonydiscord anthonydiscord requested review from anthonydiscord and removed request for abe-discord September 10, 2025 21:00

| Field | Type | Description |
|--------|---------|-------------------------------------|
| type\* | integer | `10` for a Text Display |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should probably just test this but what does Text Display show on interaction response from a Message? Do we need to keep this and add the same note we have for the selects on Message vs Modal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gimme a sec

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type

[{'type': 10, 'id': 1, 'content': 'hello world'}]

Copy link
Contributor Author

@Lulalaby Lulalaby Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interaction Create GW Payload
{
  "t": "INTERACTION_CREATE",
  "s": 58,
  "op": 0,
  "d": {
    "version": 1,
    "type": 3,
    "token": "",
    "message": {
      "webhook_id": "",
      "type": 20,
      "tts": false,
      "timestamp": "2025-09-10T21:04:24.925000+00:00",
      "position": 974,
      "pinned": false,
      "mentions": [],
      "mention_roles": [],
      "mention_everyone": false,
      "interaction_metadata": {
        "user": {
          "username": "lulalaby",
          "public_flags": 4194560,
          "primary_guild": {
            "tag": "CAP",
            "identity_guild_id": "1317206872763404478",
            "identity_enabled": true,
            "badge": "d7234d6824ca9ead59ffdcd76be30277"
          },
          "id": "856780995629154305",
          "global_name": "Lala",
          "display_name_styles": null,
          "discriminator": "0",
          "collectibles": {
            "nameplate": {
              "sku_id": "1349849614257225760",
              "palette": "violet",
              "label": "COLLECTIBLES_NAMEPLATES_VENGEANCE_A11Y",
              "expires_at": null,
              "asset": "nameplates/nameplates/vengeance/"
            }
          },
          "clan": {
            "tag": "CAP",
            "identity_guild_id": "1317206872763404478",
            "identity_enabled": true,
            "badge": "d7234d6824ca9ead59ffdcd76be30277"
          },
          "avatar_decoration_data": {
            "sku_id": "1402472280642289775",
            "expires_at": null,
            "asset": "a_b9f89cd88eabf437777bf35f55e6126f"
          },
          "avatar": "a_befab3a05e5f9b3695fe1f2971a3dc2e"
        },
        "type": 2,
        "name": "user_app simple_test uikit",
        "id": "1415442813964914698",
        "command_type": 1,
        "authorizing_integration_owners": {
          "1": "856780995629154305",
          "0": "1317206872763404478"
        }
      },
      "interaction": {
        "user": {
          "username": "lulalaby",
          "public_flags": 4194560,
          "primary_guild": {
            "tag": "CAP",
            "identity_guild_id": "1317206872763404478",
            "identity_enabled": true,
            "badge": "d7234d6824ca9ead59ffdcd76be30277"
          },
          "id": "856780995629154305",
          "global_name": "Lala",
          "display_name_styles": null,
          "discriminator": "0",
          "collectibles": {
            "nameplate": {
              "sku_id": "1349849614257225760",
              "palette": "violet",
              "label": "COLLECTIBLES_NAMEPLATES_VENGEANCE_A11Y",
              "expires_at": null,
              "asset": "nameplates/nameplates/vengeance/"
            }
          },
          "clan": {
            "tag": "CAP",
            "identity_guild_id": "1317206872763404478",
            "identity_enabled": true,
            "badge": "d7234d6824ca9ead59ffdcd76be30277"
          },
          "avatar_decoration_data": {
            "sku_id": "1402472280642289775",
            "expires_at": null,
            "asset": "a_b9f89cd88eabf437777bf35f55e6126f"
          },
          "avatar": "a_befab3a05e5f9b3695fe1f2971a3dc2e"
        },
        "type": 2,
        "name": "user_app simple_test uikit",
        "id": "1415442813964914698"
      },
      "id": "1415442815726518372",
      "flags": 32768,
      "embeds": [],
      "edited_timestamp": null,
      "content": "",
      "components": [
        {
          "type": 17,
          "spoiler": false,
          "id": 1,
          "components": [
            {
              "type": 10,
              "id": 2,
              "content": "I am a normal text component. All components are within a container. Do you like the media gallery beyond me"
            },
            {
              "type": 12,
              "items": [
                {
                  "spoiler": false,
                  "media": {
                    "width": 512,
                    "url": "https://cdn.discordapp.com/avatars/770431600046768168/7c498a87103762e274602c01c8264bbb.png?size=512",
                    "proxy_url": "https://images-ext-1.discordapp.net/external/53ePvudcdyi3SHWqSA8IS6r_qR1EleBY1ok1RgAw4hk/%3Fsize%3D512/https/cdn.discordapp.com/avatars/770431600046768168/7c498a87103762e274602c01c8264bbb.png",
                    "placeholder_version": 1,
                    "placeholder": "JBgODwLvS4dfSWdseKhXeXmJWiB5BZAG",
                    "loading_state": 2,
                    "id": "1415442817446187130",
                    "height": 512,
                    "content_type": "image/png",
                    "content_scan_metadata": {
                      "version": 2,
                      "flags": 0
                    }
                  },
                  "description": "Uh look, I'm a media gallery item UwU"
                },
                {
                  "spoiler": true,
                  "media": {
                    "width": 720,
                    "url": "https://cdn.discordapp.com/attachments/1091120901543706634/1323168995070705694/VID_20241229_215102_537.mp4?ex=68c30e67&is=68c1bce7&hm=0e0326905825af7221f28a52328b7539696de7d0caac84e05ab5a33153d8c398&",
                    "proxy_url": "https://media.discordapp.net/attachments/1091120901543706634/1323168995070705694/VID_20241229_215102_537.mp4?ex=68c30e67&is=68c1bce7&hm=0e0326905825af7221f28a52328b7539696de7d0caac84e05ab5a33153d8c398&",
                    "placeholder_version": 1,
                    "placeholder": "VBgGBARplLk6qpCnl5cfvPoqVw==",
                    "loading_state": 2,
                    "id": "1415442817446187131",
                    "height": 1280,
                    "content_type": "video/mp4",
                    "content_scan_metadata": {
                      "version": 2,
                      "flags": 0
                    }
                  },
                  "description": "I am a spoilered media gallery item"
                },
                {
                  "spoiler": false,
                  "media": {
                    "width": 336,
                    "url": "https://c.tenor.com/vMklK5h1pIAAAAAd/tenor.gif",
                    "proxy_url": "https://images-ext-1.discordapp.net/external/-qQJEvV8ogXlGEWyrRuPg48XoYBmu-xjlVrc81ofiyE/https/c.tenor.com/vMklK5h1pIAAAAAd/tenor.gif",
                    "placeholder_version": 1,
                    "placeholder": "GQgaBwAHeIh5h4eEiViIZ5d3h3BoCYcF",
                    "loading_state": 2,
                    "id": "1415442817446187132",
                    "height": 336,
                    "flags": 1,
                    "content_type": "image/gif",
                    "content_scan_metadata": {
                      "version": 2,
                      "flags": 0
                    }
                  },
                  "description": "I am a GIF"
                }
              ],
              "id": 3
            },
            {
              "type": 14,
              "spacing": 2,
              "id": 4,
              "divider": true
            },
            {
              "type": 9,
              "id": 5,
              "components": [
                {
                  "type": 10,
                  "id": 6,
                  "content": "I am a text component in a section"
                },
                {
                  "type": 10,
                  "id": 7,
                  "content": "I am another text component in the same section"
                }
              ],
              "accessory": {
                "type": 11,
                "spoiler": false,
                "media": {
                  "width": 900,
                  "url": "https://cdn.discordapp.com/attachments/1138060772266737705/1145900805153628262/ahsoka-natasha-liu-bordizzo-sabine-wren-900x507.jpg?ex=68c2d609&is=68c18489&hm=4dd153cba274447bf6773945c165bf567ef3f1ec10173bccf1f2366abb020eaf&",
                  "proxy_url": "https://media.discordapp.net/attachments/1138060772266737705/1145900805153628262/ahsoka-natasha-liu-bordizzo-sabine-wren-900x507.jpg?ex=68c2d609&is=68c18489&hm=4dd153cba274447bf6773945c165bf567ef3f1ec10173bccf1f2366abb020eaf&",
                  "placeholder_version": 1,
                  "placeholder": "SigGFIQwt4yZdmmGiWhzsAgBjA==",
                  "loading_state": 2,
                  "id": "1415442817446187133",
                  "height": 507,
                  "content_type": "image/jpeg",
                  "content_scan_metadata": {
                    "version": 2,
                    "flags": 0
                  }
                },
                "id": 8,
                "description": "I am a thumbnail image"
              }
            },
            {
              "type": 14,
              "spacing": 1,
              "id": 9,
              "divider": true
            },
            {
              "type": 1,
              "id": 10,
              "components": [
                {
                  "type": 2,
                  "style": 1,
                  "label": "I am a button in a good ol action row",
                  "id": 11,
                  "custom_id": "test_1"
                },
                {
                  "type": 2,
                  "style": 1,
                  "label": "I am another button, me too!",
                  "id": 12,
                  "custom_id": "test_2"
                },
                {
                  "type": 2,
                  "style": 6,
                  "sku_id": "1277882465020547092",
                  "id": 13
                },
                {
                  "type": 2,
                  "style": 6,
                  "sku_id": "1277884813961072681",
                  "id": 14
                },
                {
                  "type": 2,
                  "style": 6,
                  "sku_id": "1277884618460237834",
                  "id": 15
                }
              ]
            },
            {
              "type": 1,
              "id": 16,
              "components": [
                {
                  "type": 5,
                  "placeholder": "I am a user select menu within an action row",
                  "min_values": 1,
                  "max_values": 1,
                  "id": 17,
                  "custom_id": "test_3"
                }
              ]
            },
            {
              "type": 1,
              "id": 18,
              "components": [
                {
                  "type": 3,
                  "placeholder": "I am a string select menu within an action row",
                  "options": [
                    {
                      "value": "test_option_1",
                      "label": "Option 1",
                      "description": "I am the first test option"
                    },
                    {
                      "value": "test_option_2",
                      "label": "Option 2",
                      "emoji": {
                        "name": "speaking",
                        "id": "1279845492741636166",
                        "animated": true
                      },
                      "description": "I am the second test option with an emoji"
                    }
                  ],
                  "min_values": 0,
                  "max_values": 1,
                  "id": 19,
                  "custom_id": "test_4"
                }
              ]
            },
            {
              "type": 10,
              "id": 20,
              "content": "Beyond me is another separator, and I'm again a text component"
            },
            {
              "type": 14,
              "spacing": 2,
              "id": 21,
              "divider": true
            }
          ],
          "accent_color": 5451211
        },
        {
          "type": 14,
          "spacing": 2,
          "id": 22,
          "divider": false
        },
        {
          "type": 10,
          "id": 23,
          "content": "I am a text component not in any container or section. I have an invisible separator"
        }
      ],
      "channel_id": "1317909878714535946",
      "author": {
        "username": "nyuw",
        "public_flags": 65536,
        "primary_guild": null,
        "id": "822242444070092860",
        "global_name": null,
        "display_name_styles": null,
        "discriminator": "7780",
        "collectibles": null,
        "clan": null,
        "bot": true,
        "avatar_decoration_data": null,
        "avatar": "a_8337de61600eb340f466ac9b1a2a15b2"
      },
      "attachments": [],
      "application_id": "822242444070092860"
    },
    "member": {
      "user": {
        "username": "lulalaby",
        "public_flags": 4194560,
        "primary_guild": {
          "tag": "CAP",
          "identity_guild_id": "1317206872763404478",
          "identity_enabled": true,
          "badge": "d7234d6824ca9ead59ffdcd76be30277"
        },
        "id": "856780995629154305",
        "global_name": "Lala",
        "display_name_styles": null,
        "discriminator": "0",
        "collectibles": {
          "nameplate": {
            "sku_id": "1349849614257225760",
            "palette": "violet",
            "label": "COLLECTIBLES_NAMEPLATES_VENGEANCE_A11Y",
            "expires_at": null,
            "asset": "nameplates/nameplates/vengeance/"
          }
        },
        "clan": {
          "tag": "CAP",
          "identity_guild_id": "1317206872763404478",
          "identity_enabled": true,
          "badge": "d7234d6824ca9ead59ffdcd76be30277"
        },
        "avatar_decoration_data": {
          "sku_id": "1402472280642289775",
          "expires_at": null,
          "asset": "a_b9f89cd88eabf437777bf35f55e6126f"
        },
        "avatar": "a_befab3a05e5f9b3695fe1f2971a3dc2e"
      },
      "unusual_dm_activity_until": null,
      "roles": [
        "1336784655155986432",
        "1403111187431948451",
        "1403111146944467114",
        "1403115182523289680",
        "1338186724504899696",
        "1403115035416465458",
        "1415405186452815984",
        "1343357894275371028"
      ],
      "premium_since": "2025-09-10T18:34:53.407000+00:00",
      "permissions": "4503599627370495",
      "pending": false,
      "nick": "Dungeon Gremlin",
      "mute": false,
      "joined_at": "2025-02-09T17:05:08.329000+00:00",
      "flags": 10,
      "deaf": false,
      "communication_disabled_until": null,
      "collectibles": null,
      "banner": "a_aeb3580903b87f916dc2e674a5bb9bf7",
      "avatar_decoration_data": {
        "sku_id": "1399543537032237066",
        "expires_at": null,
        "asset": "a_fbefe2b8f016d8dffa230e01f89aa8f2"
      },
      "avatar": "a_35e7ece1531f3ffbdbfff4f3fb0051ac"
    },
    "locale": "en-US",
    "id": "1415442833548251177",
    "guild_locale": "en-US",
    "guild_id": "1317206872763404478",
    "guild": {
      "locale": "en-US",
      "id": "1317206872763404478",
      "features": [
        "VIDEO_BITRATE_ENHANCED",
        "AUDIO_BITRATE_256_KBPS",
        "STAGE_CHANNEL_VIEWERS_300",
        "GUILD_ONBOARDING_EVER_ENABLED",
        "VIDEO_QUALITY_1080_60FPS",
        "TIERLESS_BOOSTING_SYSTEM_MESSAGE",
        "BANNER",
        "PREMIUM_TIER_3_OVERRIDE",
        "GUILD_TAGS",
        "NEWS",
        "VANITY_URL",
        "PIN_PERMISSION_MIGRATION_COMPLETE",
        "ANIMATED_BANNER",
        "TIERLESS_BOOSTING",
        "GUILD_ONBOARDING_HAS_PROMPTS",
        "MAX_FILE_SIZE_50_MB",
        "ACTIVITY_FEED_DISABLED_BY_USER",
        "AUTO_MODERATION",
        "ROLE_ICONS",
        "AUDIO_BITRATE_384_KBPS",
        "ANIMATED_ICON",
        "VIDEO_QUALITY_720_60FPS",
        "MAX_FILE_SIZE_100_MB",
        "STAGE_CHANNEL_VIEWERS_50",
        "AUDIO_BITRATE_128_KBPS",
        "RAID_ALERTS_DISABLED",
        "STAGE_CHANNEL_VIEWERS_150",
        "COMMUNITY",
        "INVITE_SPLASH",
        "GUILD_ONBOARDING"
      ]
    },
    "entitlements": [
      {
        "user_id": "856780995629154305",
        "type": 4,
        "starts_at": null,
        "sku_id": "1277884813961072681",
        "promotion_id": null,
        "id": "1277886153604730934",
        "gift_code_flags": 0,
        "ends_at": null,
        "deleted": false,
        "application_id": "822242444070092860"
      },
      {
        "user_id": "856780995629154305",
        "type": 4,
        "starts_at": null,
        "sku_id": "1277884618460237834",
        "promotion_id": null,
        "id": "1400636869682659358",
        "gift_code_flags": 0,
        "ends_at": null,
        "deleted": false,
        "consumed": false,
        "application_id": "822242444070092860"
      }
    ],
    "entitlement_sku_ids": [
      "1277884813961072681",
      "1277884618460237834"
    ],
    "data": {
      "values": [
        "856780995629154305"
      ],
      "resolved": {
        "users": {
          "856780995629154305": {
            "username": "lulalaby",
            "public_flags": 4194560,
            "primary_guild": {
              "tag": "CAP",
              "identity_guild_id": "1317206872763404478",
              "identity_enabled": true,
              "badge": "d7234d6824ca9ead59ffdcd76be30277"
            },
            "id": "856780995629154305",
            "global_name": "Lala",
            "display_name_styles": null,
            "discriminator": "0",
            "collectibles": {
              "nameplate": {
                "sku_id": "1349849614257225760",
                "palette": "violet",
                "label": "COLLECTIBLES_NAMEPLATES_VENGEANCE_A11Y",
                "expires_at": null,
                "asset": "nameplates/nameplates/vengeance/"
              }
            },
            "clan": {
              "tag": "CAP",
              "identity_guild_id": "1317206872763404478",
              "identity_enabled": true,
              "badge": "d7234d6824ca9ead59ffdcd76be30277"
            },
            "avatar_decoration_data": {
              "sku_id": "1402472280642289775",
              "expires_at": null,
              "asset": "a_b9f89cd88eabf437777bf35f55e6126f"
            },
            "avatar": "a_befab3a05e5f9b3695fe1f2971a3dc2e"
          }
        },
        "members": {
          "856780995629154305": {
            "unusual_dm_activity_until": null,
            "roles": [
              "1336784655155986432",
              "1403111187431948451",
              "1403111146944467114",
              "1403115182523289680",
              "1338186724504899696",
              "1403115035416465458",
              "1415405186452815984",
              "1343357894275371028"
            ],
            "premium_since": "2025-09-10T18:34:53.407000+00:00",
            "permissions": "4503599627370495",
            "pending": false,
            "nick": "Dungeon Gremlin",
            "joined_at": "2025-02-09T17:05:08.329000+00:00",
            "flags": 10,
            "communication_disabled_until": null,
            "collectibles": null,
            "banner": "a_aeb3580903b87f916dc2e674a5bb9bf7",
            "avatar_decoration_data": {
              "sku_id": "1399543537032237066",
              "expires_at": null,
              "asset": "a_fbefe2b8f016d8dffa230e01f89aa8f2"
            },
            "avatar": "a_35e7ece1531f3ffbdbfff4f3fb0051ac"
          }
        }
      },
      "id": 17,
      "custom_id": "test_3",
      "component_type": 5
    },
    "context": 0,
    "channel_id": "1317909878714535946",
    "channel": {
      "type": 12,
      "total_message_sent": 975,
      "thread_metadata": {
        "locked": false,
        "invitable": true,
        "create_timestamp": "2024-12-15T17:43:20.667000+00:00",
        "auto_archive_duration": 4320,
        "archived": false,
        "archive_timestamp": "2025-08-07T12:10:57.990000+00:00"
      },
      "rate_limit_per_user": 0,
      "permissions": "4503599627370495",
      "parent_id": "1317207763721523311",
      "owner_id": "856780995629154305",
      "name": "Meow",
      "message_count": 859,
      "member_ids_preview": [
        "242367619431268353",
        "262614847353651200",
        "822242444070092860",
        "400943277693730827",
        "542793714448334858"
      ],
      "member_count": 11,
      "member": {
        "user_id": "856780995629154305",
        "muted": false,
        "mute_config": null,
        "join_timestamp": "2025-02-09T17:36:04.592000+00:00",
        "id": "1317909878714535946",
        "flags": 1
      },
      "last_message_id": "1415442815726518372",
      "id": "1317909878714535946",
      "guild_id": "1317206872763404478",
      "flags": 0
    },
    "authorizing_integration_owners": {
      "1": "856780995629154305",
      "0": "1317206872763404478"
    },
    "attachment_size_limit": 524288000,
    "application_id": "822242444070092860",
    "app_permissions": "2222085186637376"
  }
}

This is the interesting part:

    "data": {
      "values": [
        "856780995629154305"
      ],
      "resolved": {
        "users": {
          "856780995629154305": {
            "username": "lulalaby",
            "public_flags": 4194560,
            "primary_guild": {
              "tag": "CAP",
              "identity_guild_id": "1317206872763404478",
              "identity_enabled": true,
              "badge": "d7234d6824ca9ead59ffdcd76be30277"
            },
            "id": "856780995629154305",
            "global_name": "Lala",
            "display_name_styles": null,
            "discriminator": "0",
            "collectibles": {
              "nameplate": {
                "sku_id": "1349849614257225760",
                "palette": "violet",
                "label": "COLLECTIBLES_NAMEPLATES_VENGEANCE_A11Y",
                "expires_at": null,
                "asset": "nameplates/nameplates/vengeance/"
              }
            },
            "clan": {
              "tag": "CAP",
              "identity_guild_id": "1317206872763404478",
              "identity_enabled": true,
              "badge": "d7234d6824ca9ead59ffdcd76be30277"
            },
            "avatar_decoration_data": {
              "sku_id": "1402472280642289775",
              "expires_at": null,
              "asset": "a_b9f89cd88eabf437777bf35f55e6126f"
            },
            "avatar": "a_befab3a05e5f9b3695fe1f2971a3dc2e"
          }
        },
        "members": {
          "856780995629154305": {
            "unusual_dm_activity_until": null,
            "roles": [
              "1336784655155986432",
              "1403111187431948451",
              "1403111146944467114",
              "1403115182523289680",
              "1338186724504899696",
              "1403115035416465458",
              "1415405186452815984",
              "1343357894275371028"
            ],
            "premium_since": "2025-09-10T18:34:53.407000+00:00",
            "permissions": "4503599627370495",
            "pending": false,
            "nick": "Dungeon Gremlin",
            "joined_at": "2025-02-09T17:05:08.329000+00:00",
            "flags": 10,
            "communication_disabled_until": null,
            "collectibles": null,
            "banner": "a_aeb3580903b87f916dc2e674a5bb9bf7",
            "avatar_decoration_data": {
              "sku_id": "1399543537032237066",
              "expires_at": null,
              "asset": "a_fbefe2b8f016d8dffa230e01f89aa8f2"
            },
            "avatar": "a_35e7ece1531f3ffbdbfff4f3fb0051ac"
          }
        }
      },
      "id": 17,
      "custom_id": "test_3",
      "component_type": 5
    }

we have the special case for selects, but we still get the full object for the text display in message
so we have nothing special applied here. only thing we could maybe outline is that the response structure is only valid for modal submits?

Copy link
Contributor Author

@Lulalaby Lulalaby Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or we could rename this specific thing to Text Display Modal Interaction Response Structure since this structure never applies to normal message interactions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh gotcha this makes sense now. I think I like it best like this!

@anthonydiscord anthonydiscord merged commit c6b93fc into discord:main Sep 10, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants