Components

This document serves as a comprehensive reference for all available components. It covers three main categories:

  • Layout Components - For organizing and structuring content (Action Rows, Sections, Containers)
  • Content Components - For displaying static text, images, and files (Text Display, Media Gallery, Thumbnails)
  • Interactive Components - For user interactions (Buttons, Select Menus, Text Input)

To use these components, you need to send the IS_COMPONENTS_V2 message flag, which can be sent on a per-message basis. Once a message has been sent with this flag, it can't be removed from the message. This enables the new components system with the following changes:

  • The content and embeds fields will no longer work, but you'll be able to use Text Display and Container as replacements
  • Attachments won't show by default—they must be exposed through components
  • The poll and stickers fields are disabled
  • Messages allow up to 40 total components
  • The combined length of all text across all components cannot exceed 4000 characters

What is a Component

Components allow you to style and structure your messages, modals, and interactions. They are interactive elements that can create rich user experiences in your Discord integrations.

Components are a field on the message object and in modals. You can use them when creating messages or responding to an interaction, like an application command.

Legacy Message Component Behavior

Before the introduction of the IS_COMPONENTS_V2 flag, message components were sent in conjunction with message content. This means that you could send a message using a subset of the available components without setting the IS_COMPONENTS_V2 flag, and the components would be included in the message content along with content and embeds.

Additionally, components of messages preceding components v2 will contain an id of 0.

Component Object

Component Type
ValueNameDescriptionStyleUsage
1ACTION_ROWA container for other componentsLayoutMessage, Modal (deprecated)
2BUTTONA button objectInteractiveMessage
3STRING_SELECTSelect menu for picking from defined text optionsInteractiveMessage, Modal
4TEXT_INPUTText input objectInteractiveModal
5USER_SELECTSelect menu for usersInteractiveMessage, Modal
6ROLE_SELECTSelect menu for rolesInteractiveMessage, Modal
7MENTIONABLE_SELECTSelect menu for mentionables (users and roles)InteractiveMessage, Modal
8CHANNEL_SELECTSelect menu for channelsInteractiveMessage, Modal
9SECTION 1Container to display text alongside an accessory componentLayoutMessage
10TEXT_DISPLAY 1Markdown textContentMessage, Modal
11THUMBNAIL 1Small image that can be used as an accessoryContentMessage
12MEDIA_GALLERY 1Display images and other mediaContentMessage
13FILE 1Displays an attached fileContentMessage
14SEPARATOR 1Component to add vertical padding between other componentsLayoutMessage
16CONTENT_INVENTORY_ENTRY 2Displays an activity feed entryContentMessage
17CONTAINER 1Container that visually groups a set of componentsLayoutMessage
18LABELContainer associating a label and description with a componentLayoutModal
19FILE_UPLOADComponent to upload one or more filesInteractiveModal
20CHECKPOINT_CARD 2Displays a checkpointContentMessage
21RADIO_GROUPSingle-choice set of radio optionsInteractiveModal
22CHECKBOX_GROUPMulti-select group of checkboxesInteractiveModal
23CHECKBOXSingle checkbox for binary choiceInteractiveModal

1 Requires the IS_COMPONENTS_V2 message flag.

2 Not usable by bots.

Anatomy of a Component

All components have the following fields:

FieldTypeDescription
typeintegerThe type of the component
id?integer32-bit integer used as an optional identifier for the component

The id field is optional and is used to identify components in the response from an interaction that aren't interactive components. The id must be unique within the message and is generated sequentially if left empty. Generation of ids won't use another id that exists in the message if you have one defined for another component. Sending components with an id of 0 is allowed but will be treated as empty and replaced by the API.

Custom ID

Additionally, interactive components like buttons and selects must have a custom_id field. The developer defines this field when sending the component payload, and it is returned in the interaction payload sent when a user interacts with the component. For example, if you set custom_id: click_me on a button, you'll receive an interaction containing custom_id: click_me when a user clicks that button.

custom_id is only available on interactive components and must be unique per component. Multiple components on the same message must not share the same custom_id. This field is a string of a maximum of 100 characters and can be used flexibly to maintain state or pass through other important data.

FieldTypeDescription
custom_idstringDeveloper-defined identifier (1-100 characters)

Action Row

An Action Row is a top-level layout component used in messages and modals.

Action Rows can contain:

Action Row Structure
FieldTypeDescription
typeintegerAlways ACTION_ROW
id?integerAn optional identifier for the component
componentsarray[component object]Up to 5 button components or a single select component
Example Action Row
{
"type": 1,
"components": [
{
"type": 2,
"label": "Accept",
"style": 1,
"custom_id": "click_yes"
},
{
"type": 2,
"label": "Learn More",
"style": 5,
"url": "http://watchanimeattheoffice.com/"
},
{
"type": 2,
"label": "Decline",
"style": 4,
"custom_id": "click_no"
}
]
}

Button

A Button is an interactive component that can only be used in messages. It creates clickable elements that users can interact with, sending an interaction to your app when clicked.

Buttons must be placed inside an Action Row or a Section's accessory field.

Button Structure
FieldTypeDescription
typeintegerAlways BUTTON
id?integerAn optional identifier for the component
styleintegerA button style
label?stringText that appears on the button (max 80 characters)
emoji?partial emoji objectThe emoji that appears on the button
custom_idstringDeveloper-defined identifier for the button (1-100 characters)
sku_id?snowflakeIdentifier for a purchasable SKU, only available when using premium-style buttons
url?stringURL for link-style buttons (max 512 characters)
disabled?booleanWhether the button is disabled (default false)

Buttons come in various styles to convey different types of actions. These styles also define what fields are valid for a button.

  • Non-link and non-premium buttons must have a custom_id, and cannot have a url or a sku_id.
  • Link buttons must have a url, and cannot have a custom_id
  • Link buttons do not send an interaction to your app when clicked
  • Premium buttons must contain a sku_id, and cannot have a custom_id, label, url, or emoji.
  • Premium buttons do not send an interaction to your app when clicked
Button Style
ValueNameActionRequired Field
1PRIMARYThe most important or recommended action in a group of optionscustom_id
2SECONDARYAlternative or supporting actionscustom_id
3SUCCESSPositive confirmation or completion actionscustom_id
4DANGERAn action with irreversible consequencescustom_id
5LINKNavigates to a URLurl
6PREMIUMPurchasesku_id
Example Button
{
"type": 1,
"components": [
{
"type": 2,
"label": "Click me!",
"style": 1,
"custom_id": "clicked_me"
}
]
}

Button Design Guidelines

General Button Content
  • 34 characters max with icon or emoji.
  • 38 characters max without icon or emoji.
Premium Buttons

Premium buttons will automatically have the following:

  • Shop icon
  • SKU name
  • SKU price

String Select

A String Select is an interactive component that allows users to select one or more provided options in a message.

String Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction.

String Selects are available in messages and modals. They must be placed inside an Action Row in messages and a Label in modals.

String Select Structure
FieldTypeDescription
typeintegerAlways STRING_SELECT
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the select menu (1-100 characters)
optionsarray[select option object]Specified choices in a select menu (max 25)
placeholder?stringPlaceholder text if nothing is selected (max 150 characters)
min_values?integerMinimum number of items that must be chosen (max 25, default 1)
max_values?integerMaximum number of items that can be chosen (max 25, default 1)
required? 1booleanWhether the component is required to be filled (default true)
disabled? 2booleanWhether the select menu is disabled (default false)

1 Only applicable within modals.

2 Cannot be set in modals.

Select Option Structure
FieldTypeDescription
labelstringUser-facing name of the option (max 100 characters)
valuestringDeveloper-defined value of the option (1-100 characters)
description?stringAdditional description of the option (max 100 characters)
emoji?partial emoji objectEmoji to show next to the name
default?booleanWhether to show this option as selected by default (default false)
Example String Select
{
"type": 3,
"custom_id": "string_select",
"placeholder": "Favorite bug?",
"options": [
{
"label": "Ant",
"value": "ant",
"description": "(best option)",
"emoji": { "name": "🐜" }
},
{
"label": "Butterfly",
"value": "butterfly",
"emoji": { "name": "🦋" }
},
{
"label": "Catarpillar",
"value": "caterpillar",
"emoji": { "name": "🐛" }
}
]
}

Text Input

Text Input is an interactive component that allows users to enter free-form text responses in modals. It supports both short, single-line inputs and longer, multi-line paragraph inputs.

Text Inputs can only be used within modals and must be placed inside an Action Row or a Label.

Text Input Structure
FieldTypeDescription
typeintegerAlways TEXT_INPUT
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the input (1-100 characters)
styleintegerThe text input style
label (deprecated) 1stringLabel for this component (max 45 characters)
min_length?integerMinimum input length for a text input (max 4000)
max_length?integerMaximum input length for a text input (1-4000)
required?booleanWhether this component is required to be filled (default true)
value?stringPrefilled value for the component (max 4000 characters)
placeholder?stringCustom placeholder text if the input is empty (max 100 characters)

1 Ignored within a Label in favor of its label and description fields.

Text Input Style
ValueNameDescription
1SMALLSingle-line input
2PARAGRAPHMulti-line input
Example Text Input
{
"type": 1,
"components": [
{
"type": 4,
"custom_id": "name",
"label": "Name",
"style": 1,
"min_length": 1,
"max_length": 4000,
"placeholder": "John",
"required": true
}
]
}

User Select

A User Select is an interactive component that allows users to select one or more users in a message. Options are automatically populated based on the guild's available users.

User Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction.

User Selects are available in messages and modals. They must be placed inside an Action Row in messages and a Label in modals.

User Select Structure
FieldTypeDescription
typeintegerAlways USER_SELECT
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the select menu (1-100 characters)
placeholder?stringPlaceholder text if nothing is selected (max 150 characters)
default_values?array[default value object]Default values for auto-populated select menu components (max 25)
min_values?integerMinimum number of items that must be chosen (max 25, default 1)
max_values?integerMaximum number of items that can be chosen (max 25, default 1)
required? 1booleanWhether the component is required to be filled (default true)
disabled? 2booleanWhether the select menu is disabled (default false)

1 Only applicable within modals.

2 Cannot be set in modals.

Select Default Value Structure
FieldTypeDescription
idsnowflakeID of a user, role, or channel
typestringType of value associated with the ID
Example User Select
{
"type": 1,
"components": [
{
"type": 5,
"custom_id": "user_select",
"placeholder": "Select a user"
}
]
}

Role Select

A Role Select is an interactive component that allows users to select one or more roles in a message. Options are automatically populated based on the guild's available roles.

Role Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction.

Role Selects are available in messages and modals. They must be placed inside an Action Row in messages and a Label in modals.

Role Select Structure
FieldTypeDescription
typeintegerAlways ROLE_SELECT
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the select menu (1-100 characters)
placeholder?stringPlaceholder text if nothing is selected (max 150 characters)
default_values?array[default value object]Default values for auto-populated select menu components (max 25)
min_values?integerMinimum number of items that must be chosen (max 25, default 1)
max_values?integerMaximum number of items that can be chosen (max 25, default 1)
required? 1booleanWhether the component is required to be filled (default true)
disabled? 2booleanWhether the select menu is disabled (default false)

1 Only applicable within modals.

2 Cannot be set in modals.

Example Role Select
{
"type": 1,
"components": [
{
"type": 6,
"custom_id": "role_select",
"placeholder": "Which roles?",
"min_values": 1,
"max_values": 3
}
]
}

Mentionable Select

A Mentionable Select is an interactive component that allows users to select one or more mentionables in a message. Options are automatically populated based on available mentionables in the guild.

Mentionable Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s), your app receives an interaction.

Mentionable Selects are available in messages and modals. They must be placed inside an Action Row in messages and a Label in modals.

Mentionable Select Structure
FieldTypeDescription
typeintegerAlways MENTIONABLE_SELECT
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the select menu (1-100 characters)
placeholder?stringPlaceholder text if nothing is selected (max 150 characters)
default_values?array[default value object]Default values for auto-populated select menu components (max 25)
min_values?integerMinimum number of items that must be chosen (max 25, default 1)
max_values?integerMaximum number of items that can be chosen (max 25, default 1)
required? 1booleanWhether the component is required to be filled (default true)
disabled? 2booleanWhether the select menu is disabled (default false)

1 Only applicable within modals.

2 Cannot be set in modals.

Example Mentionable Select
{
"type": 1,
"components": [
{
"type": 7,
"custom_id": "mentionable_select",
"placeholder": "Who?"
}
]
}

Channel Select

A Channel Select is an interactive component that allows users to select one or more channels in a message. Options are automatically populated based on available channels in the guild and can be filtered by channel types.

Channel Selects can be configured for both single-select and multi-select behavior. When a user finishes making their choice(s) your app receives an interaction.

Channel Selects are available in messages and modals. They must be placed inside an Action Row in messages and a Label in modals.

Channel Select Structure
FieldTypeDescription
typeintegerAlways CHANNEL_SELECT
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the select menu (1-100 characters)
channel_types?array[integer]Channel types to include in the channel select component
placeholder?stringPlaceholder text if nothing is selected (max 150 characters)
default_values?array[default value object]Default values for auto-populated select menu components (max 25)
min_values?integerMinimum number of items that must be chosen (max 25, default 1)
max_values?integerMaximum number of items that can be chosen (max 25, default 1)
required? 1booleanWhether the component is required to be filled (default true)
disabled? 2booleanWhether the select menu is disabled (default false)

1 Only applicable within modals.

2 Cannot be set in modals.

Example Channel Select
{
"type": 1,
"components": [
{
"type": 8,
"custom_id": "channel_select",
"channel_types": [0],
"placeholder": "Which text channel?"
}
]
}

Section

A Section is a top-level layout component that allows you to join text contextually with an accessory.

Sections are only available in messages.

Section Structure
FieldTypeDescription
typeintegerAlways SECTION
id?integerAn optional identifier for the component
components 1array[text display component object]Text components to display (1-3)
accessory 1thumbnail object | button objectA thumbnail or a button component

1 May be expanded to include other component types in the future.

Example Section
{
"type": 9,
"components": [
{
"type": 10,
"content": "# Real Game v7.3"
},
{
"type": 10,
"content": "Hope you're excited, the update is finally here! Here are some of the changes:\n- Fixed a bug where certain treasure chests wouldn't open properly\n- Improved server stability during peak hours\n- Added a new type of gravity that will randomly apply when the moon is visible in-game\n- Every third thursday the furniture will scream your darkest secrets to nearby npcs"
},
{
"type": 10,
"content": "-# That last one wasn't real, but don't use voice chat near furniture just in case..."
}
],
"accessory": {
"type": 11,
"media": {
"url": "https://websitewithopensourceimages/gamepreview.png"
}
}
}

Text Display

A Text Display is a top-level content component that allows you to add markdown formatted text, including mentions (users, roles, etc) and emoji. The behavior of this component is extremely similar to the content field of a message, but allows you to add multiple text components, controlling the layout of your message.

When sent in a message, mentions (@user, @role, etc.) present in this component will ping and send notifications based on the value of allowed_mentions in the message.

Text Display Structure
FieldTypeDescription
typeintegerAlways TEXT_DISPLAY
id?integerAn optional identifier for the component
contentstringText that will be displayed similar to a message (1-4000 characters)

Thumbnail

A Thumbnail is a content component that is a small image only usable as an accessory in a section. The preview comes from an url or attachment through the unfurled media item structure.

Thumbnails are only available in messages as an accessory in a section.

Thumbnail Structure
FieldTypeDescription
typeintegerAlways THUMBNAIL
id?integerAn optional identifier for the component
mediaunfurled media item objectA URL or attachment
description??stringAlt text for the media (max 1024 characters)
spoiler?booleanWhether the thumbnail should be spoilered (default false)

A Media Gallery is a top-level content component that allows you to display 1-10 media attachments in an organized gallery format. Each item can have optional descriptions and can be marked as spoilers.

Media Galleries are only available in messages.

FieldTypeDescription
typeintegerAlways MEDIA_GALLERY
id?integerOptional identifier for component
itemsarray[media gallery item object]Items to display in the gallery (1-10)
FieldTypeDescription
mediaunfurled media item objectA URL or attachment
description??stringAlt text for the media (max 1024 characters)
spoiler?booleanWhether the media should be a spoilered (default false)
{
"type": 12,
"items": [
{
"media": { "url": "https://livevideofeedconvertedtoimage/webcam1.png" },
"description": "An aerial view looking down on older industrial complex buildings. The main building is white with many windows and pipes running up the walls."
},
{
"media": { "url": "https://livevideofeedconvertedtoimage/webcam2.png" },
"description": "An aerial view of old broken buildings. Nature has begun to take root in the rooftops. A portion of the middle building's roof has collapsed inward. In the distant haze you can make out a far away city."
},
{
"media": { "url": "https://livevideofeedconvertedtoimage/webcam3.png" },
"description": "A street view of a downtown city. Prominently in photo are skyscrapers and a domed building"
}
]
}

File

A File is a top-level component that allows you to display an uploaded file as an attachment to the message and reference it in the component. Each file component can only display 1 attached file, but you can upload multiple files and add them to different file components within your payload.

Files are only available in messages.

File Structure
FieldTypeDescription
typeintegerAlways FILE
id?integerAn optional identifier for the component
fileunfurled media item objectThe file attachment (does not support URLs)
spoiler?booleanWhether the media should be a spoiler (default false)
name 1stringThe name of the file
size 1integerThe size of the file in bytes

1 This field is received only and cannot be set.

Example File Component
{
"type": 13,
"file": {
"url": "attachment://game.zip"
}
}

Separator

A Separator is a top-level layout component that adds vertical padding and visual division between other components.

Separators are only available in messages.

Separator Structure
FieldTypeDescription
typeintegerAlways SEPARATOR
id?integerAn optional identifier for the component
divider?booleanWhether a visual divider should be displayed in the component (default true)
spacing?integerSize of separator padding (default SMALL)
Separator Spacing Type
ValueNameDescription
1SMALL8px gap between elements, 16px with divider hidden
2LARGE16px gap between elements, 32px with divider hidden
Example Separator
{
"type": 14,
"divider": true,
"spacing": 1
}

Content Inventory Entry

A Content Inventory Entry is a top-level component that displays an activity feed entry.

Content Inventory Entries cannot be sent directly.

Content Inventory Entry Structure
FieldTypeDescription
typeintegerAlways CONTENT_INVENTORY_ENTRY
id?integerAn optional identifier for the component
content_inventory_entrycontent inventory entry objectContent inventory entry data
Content Inventory Entry Object
FieldTypeDescription
idstringThe ID of the entry as a snowflake when sent in guild or a string of numbers when DMed
author_idsnowflakeThe ID of the user this entry is for
author_typeintegerThe type of author that created this entry
content_typeinteger[The type of content]](#content-inventory-content-type)
traitsarray[content inventory trait object]Contains info such as streak, marathon, and time
extracontent inventory metadata objectMetadata, such as a game or song
participants?array[snowflake]The IDs of all users involved with this entry
expires_at?ISO8601 timestampWhen this entry expires
ended_at?ISO8601 timestampWhen this entry ended
started_at?ISO8601 timestampWhen this entry started
original_id?snowflakeID of the entry
guild_id?snowflakeGuild ID this entry happened in
channel_id?snowflakeChannel ID this entry happened in
session_id?snowflakeSession ID of this entry
signaturecontent inventory signature objectSignature metadata for validation
Content Inventory Author Type
ValueNameDescription
0AUTHOR_TYPE_UNSPECIFIEDNo author type specified
1USERA Discord user
Content Inventory Content Type
ValueNameDescription
0CONTENT_TYPE_UNSPECIFIEDNo content type specified
1PLAYED_GAMEA game that was played
2WATCHED_MEDIAMedia that was watched (e.g. Crunchyroll)
3TOP_GAMETop played game in the guild
4LISTENED_MEDIAMedia that was listened to (e.g. Spotify)
5LISTENED_SESSIONMedia listening session (e.g. Spotify Listen Along)
6TOP_ARTISTTop listened artist in the guild
7CUSTOM_STATUSCustom status activity
8LAUNCHED_ACTIVITYEmbedded activity
9LEADERBOARDLeaderboard entry (e.g. League of Legends)
Content Inventory Trait Object
FieldTypeDescription
typeintegerThe type of trait
first_time?booleanShows the "New player" text (only FIRST_TIME)
duration_seconds?integerTotal time elapsed during the entry (only DURATION_SECONDS)
is_live?booleanWhether the entry is still ongoing (only IS_LIVE)
range?integerTime range (only AGGREGATE_RANGE)
resurrected_last_played?ISO8601 timestampWhen the game for the entry was last played (only RESURRECTED)
marathon?booleanShows the "#h marathon" text (only MARATHON)
streak_count_days?integerNumber of days for the streak text (only STREAK_DAYS)
trending?integerThe trending type (only TRENDING_CONTENT)
count?integerTotal count (only TOP_ITEM_TOTAL_COUNT, TOP_PARENT_ITEM_TOTAL_COUNT, AGGREGATE_COUNT)
Content Inventory Trait Type
ValueNameDescription
0TRAIT_TYPE_UNSPECIFIEDNo trait type specified
1FIRST_TIMEFirst time the content was played
2DURATION_SECONDSTotal duration in seconds
3IS_LIVEWhether the content is currently live
4AGGREGATE_RANGETime range for the aggregated data
5RESURRECTEDWhether the user is returning to content previously interacted with (e.g. game)
6MARATHONWhether the content is part of a marathon
7NEW_RELEASEWhether the content is a new release
8STREAK_DAYSNumber of days in the streak
9TRENDING_CONTENTWhether the content is trending
10TOP_ITEM_TOTAL_COUNTTotal count of the top item in the guild
11TOP_PARENT_ITEM_TOTAL_COUNTTotal count of the top parent item in the guild
12AGGREGATE_COUNTAggregate count of the content in the guild
Content Inventory Aggregate Range Type
ValueNameDescription
0AGGREGATE_RANGE_UNSPECIFIEDNo aggregate range specified
1WEEKLast 7 days of data
ValueNameDescription
0TRENDING_TYPE_UNSPECIFIEDNo trending type specified
1GLOBALGlobal trending content
Content Inventory Metadata Object
FieldTypeDescription
typestringMetadata type
game_name?stringThe name of the game (played_game_extra only)
application_id?snowflakeThe ID of the associated application
platform?integerThe type of platform (only played_game_extra)
last_update?ISO8601 timestampWhen the entry was last updated
entries?array[metadata entry object]Entries (only 1 for the component)
media?metadata entry objectMetadata object of type listened_media_extra
provider?integerThe provider of the media (only listened_media_extra)
media_type?integerThe type of media (only listened_media_extra)
parent_title?stringThe title of the media's parent (album title when media_type is TRACK) (only listened_media_extra)
title?stringThe title of the media (only listened_media_extra)
image_url?stringImage for the media (e.g. album art) (only listened_media_extra)
artist?artist objectTop listened artist (only top_artist_extra)
artists?array[artist object]Artists for the media (empty when top_artist_extra) (only listened_media_extra)
external_id?stringThe external platform ID for the media (e.g. Spotify track ID) (only listened_media_extra)
external_parent_id?stringThe external platform ID for the media's parent (e.g. Spotify album ID) (only listened_media_extra)
media_assets_large_image?stringThe large image for the media (e.g. movie poster) (only watched_media_extra)
media_assets_large_text?stringText displayed when hovering over the large image (e.g. season and episode of a show) (only watched_media_extra)
media_assets_small_image?stringSmall image for the media (e.g. platform logo) (only watched_media_extra)
media_assets_small_text?stringText displayed when hovering over the small image (e.g. platform name) (only watched_media_extra)
media_title?stringThe title of the media (only watched_media_extra)
media_subtitle?stringThe subtitle of the media (only watched_media_extra)
url?stringThe URL of the media (only watched_media_extra)
activity_name?stringThe name of the activity (only launched_activity_extra)
Content Inventory Metadata Type
ValueDescription
played_game_extraGame
listened_session_extraListened session (e.g. Spotify)
listened_media_extraListened media (e.g. Spotify track)
top_artist_extraTop artist (e.g. Spotify)
watched_media_extraWatched media (e.g. Crunchyroll)
launched_activity_extraEmbedded activity
Content Inventory Provider Type
ValueNameDescription
0PROVIDER_UNSPECIFIEDNo provider specified
1SPOTIFYSpotify
Content Inventory Media Type
ValueNameDescription
0TOP_ARTISTTop artist in the guild
1TRACKTrack in a media provider (e.g. Spotify)
Content Inventory Metadata Entry Object
FieldTypeDescription
media?metadata objectMetadata object of type listened_media_extra
verification_state?integer
repeat_count?integerHow many times this track has been played on repeat
Content Inventory Artist Object
FieldTypeDescription
external_idstringThe external platform ID for this artist (e.g. Spotify artist ID)
namestringThe ame of the artist
Content Inventory Platform Type
ValueNameDescription
0DESKTOPDesktop
1XBOXXbox integration
2PLAYSTATIONPlayStation integration
3IOSiOS
4ANDROIDAndroid
5NINTENDONintendo integration
6LINUXLinux
7MACOSmacOS
Content Inventory Signature Object
FieldTypeDescription
signaturestringSHA256 hash of the entry
kidstringKey ID for the signature
versionintegerSignature version (currently 1)
Example Content Inventory Entry
{
"type": 16,
"id": "0",
"content_inventory_entry": {
"author_id": "150745989836308480",
"author_type": 1,
"content_type": 1,
"ended_at": "2025-04-23T02:13:18.123000+00:00",
"extra": {
"application_id": "356879032584896512",
"game_name": "Garry's Mod",
"platform": 0,
"type": "played_game_extra"
},
"id": "1364423860543557746",
"participants": ["150745989836308480"],
"signature": {
"kid": "AtDT4Kx25Wmu5cfllPxAiwZKgPbmLsaeHitpx/duvPY=",
"signature": "580e54d406bc466a936cbd9a1b8f19954997187d56638c84871cc5f3cd9c245b",
"version": 1
},
"started_at": "2025-04-23T02:11:24.123000+00:00",
"traits": [
{
"duration_seconds": 114,
"type": 2
},
{
"streak_count_days": 3,
"type": 8
}
]
}
}

Container

A Container is a top-level layout component that holds up to 10 components. Containers are visually distinct from surrounding components and have an optional customizable color bar.

Containers are only available in messages.

Container Structure
FieldTypeDescription
typeintegerAlways CONTAINER
id?integerAn optional identifier for the component
componentsarray[component object]Components of the type action row, text display, section, media gallery, separator, or file (1-10)
accent_color??integerColor for the accent on the container encoded as an integer representation of a hexadecimal color code
spoiler?booleanWhether the container should be spoilered (default false)
Example Container
{
"type": 17,
"accent_color": 703487,
"components": [
{
"type": 10,
"content": "# You have encountered a wild coyote!"
},
{
"type": 12,
"items": [
{
"media": { "url": "https://websitewithopensourceimages/coyote.png" }
}
]
},
{
"type": 10,
"content": "What would you like to do?"
},
{
"type": 1,
"components": [
{
"type": 2,
"custom_id": "pet_coyote",
"label": "Pet it!",
"style": 1
},
{
"type": 2,
"custom_id": "feed_coyote",
"label": "Attempt to feed it",
"style": 2
},
{
"type": 2,
"custom_id": "run_away",
"label": "Run away!",
"style": 4
}
]
}
]
}

Label

A Label is a top-level layout component. Labels wrap modal components with text as a label and optional description.

Label Structure
FieldTypeDescription
typeintegerAlways LABEL
id?integerAn optional identifier for the component
labelstringThe label text (max 45 characters)
description?stringAn optional description text for the label (max 100 characters)
componentcomponent objectInner component of the type string select, text input, user select, role select, mentionable select, channel select, file upload, radio group, checkbox group, or checkbox

File Upload

File Upload is an interactive component that allows users to upload up to 10 files in modals.

File Uploads can only be used within modals and must be placed inside a Label.

File Upload Structure
FieldTypeDescription
typeintegerAlways FILE_UPLOAD
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the file upload (1-100 characters)
min_values?integerMinimum number of items that must be uploaded (max 10, default 0)
max_values?integerMaximum number of items that can be chosen (max 10, default 10)
required?booleanWhether the user must upload a file (default false)

Checkpoint Card

A Checkpoint Card is a top-level component that displays a summary of the user's checkpoint.

Checkpoint cards cannot be sent directly.

Checkpoint Card Structure
FieldTypeDescription
typeintegerAlways CHECKPOINT_CARD
id?integerAn optional identifier for the component
checkpoint_datacheckpoint data objectCheckpoint data
Checkpoint Data Structure
FieldTypeDescription
versionintegerThe version of checkpoint cards
card_idintegerThe type of checkpoint card
power_levelfloatA power level representing how active the user was on Discord
power_level_percentilefloatThe power level expressed as a percentile
num_messages_sentintegerNumber of messages that the user during the year
total_voice_minutesfloatDuration in seconds how much time the user spent in voice channels during the year
num_emojis_sentintegerNumber of emojis that the user during the year (includes messages and reactions)
top_guild?checkpoint card guild objectThe guild that the user have been participating the most in
top_emoji?checkpoint card emoji objectThe emoji that the user used the most
top_game?checkpoint card game objectThe game that the user have been played the most
Checkpoint Card Guild Structure
FieldTypeDescription
guild_idsnowflakeThe ID of the guild
guild_namestringThe name of the guild
guild_icon?stringThe guild's icon hash
Checkpoint Card Emoji Structure
FieldTypeDescription
emoji_id?snowflakeThe ID of the guild's custom emoji
emoji_namestringThe unicode character or name of the emoji
Checkpoint Card Game Structure
FieldTypeDescription
application_idsnowflakeThe ID of the application
application_namestringThe name of the application
application_image_id?stringThe application's icon hash
Example Checkpoint Card
{
"type": 20,
"id": 1,
"checkpoint_data": {
"version": 0,
"num_messages_sent": 53146,
"total_voice_minutes": 6.3231166666666665,
"num_emojis_sent": 13096,
"top_emoji": {
"emoji_id": "1145727546747535412",
"emoji_name": "blobcatcozy"
},
"top_guild": {
"guild_id": "1046920999469330512",
"guild_name": "Alien Network",
"guild_icon": "66b0f4d96c145970fa9d96ada8afadf3"
},
"top_game": {
"application_id": "363445589247131668",
"application_name": "Roblox",
"application_image_id": "f2b60e350a2097289b3b0b877495e55f"
},
"card_id": 5,
"power_level": 83732.32311666667,
"power_level_percentile": 96.71
}
}

Radio Group

Radio Group is an interactive component for selecting exactly one option from a defined list.

Radio Groups can only be used within modals and must be placed inside a Label.

Radio Group Structure
FieldTypeDescription
typeintegerAlways RADIO_GROUP
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the radio group (1-100 characters)
optionsarray[radio group option object]Options to render (min 2, max 10)
required?booleanWhether the user must select an option (default true)
Radio Group Option Structure
FieldTypeDescription
valuestringDeveloper-defined value of the option (1-100 characters)
labelstringUser-facing name of the option (max 100 characters)
description?stringAdditional description of the option (max 100 characters)
default?booleanWhether to show this option as selected by default (default false)

Checkbox Group

Checkbox Group is an interactive component for selecting one or many options via checkboxes.

Checkbox Groups can only be used within modals and must be placed inside a Label.

Checkbox Group Structure
FieldTypeDescription
typeintegerAlways CHECKBOX_GROUP
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the checkbox group (1-100 characters)
optionsarray[checkbox group option object]Options to render (min 2, max 10)
min_values?integerMinimum number of boxes that must be checked (max 10, default 1)
max_values?integerMaximum number of boxes that can be checked (1-10)
required?booleanWhether the user must select an option (default true)
Checkbox Group Option Structure
FieldTypeDescription
valuestringDeveloper-defined value of the option (1-100 characters)
labelstringUser-facing name of the option (max 100 characters)
description?stringAdditional description of the option (max 100 characters)
default?booleanWhether to show this option as checked by default (default false)

Checkbox

Checkbox is a single interactive component for simple yes/no style questions.

Checkboxes can only be used within modals and must be placed inside a Label.

Checkbox Structure
FieldTypeDescription
typeintegerAlways CHECKBOX
id?integerAn optional identifier for the component
custom_idstringDeveloper-defined identifier for the checkbox (1-100 characters)
default?booleanWhether the box is checked by default (default false)

Unfurled Media Item Object

Unfurled Media Item Object Structure
FieldTypeDescription
id? 1snowflakeThe ID of the media item
urlstringThe URL of the media, supports arbitrary URLs and attachment://<filename> references (max 2048 characters)
proxy_url? 1stringThe proxied URL of the media item
height? 1?integerThe height of the media item
width? 1?integerThe width of the media item
flags? 1integerThe media's attachment flags
content_type? 1stringThe media type of the content
content_scan_metadata? 1content scan metadata objectThe content scan metadata for the media
placeholder_version? 1integerThe attachment placeholder protocol version (currently 1)
placeholder? 1stringA low-resolution thumbhash of the media, to display before it is loaded
loading_state? 1integerThe loading state of the media item
attachment_id? 1snowflakeThe ID of the uploaded attachment, if any

1 This field is received only and cannot be set.

Unfurled Media Item Loading State
ValueNameDescription
0UNKNOWNLoading state is unknown
1LOADINGMedia item is currently loading
2LOADED_SUCCESSMedia item has loaded successfully
3LOADED_NOT_FOUNDMedia item has loaded but was not found