Skip to content

Section

type: 9 Messages

The Section places text on the left and an accessory on the right. The accessory can be a Thumbnail (small image) or a Button.

Preview
My BotAPPToday at 12:00 PM

Ana García

Level 42 · 12,350 XP

Member since 2021

Ana's avatar

Event notifications

Get notified when an event starts.

payload.json
{
"flags": 32768,
"components": [
{
"type": 9,
"components": [
{
"type": 10,
"content": "### Ana García"
},
{
"type": 10,
"content": "Level **42** · 12,350 XP\n-# Member since 2021"
}
],
"accessory": {
"type": 11,
"media": {
"url": "attachment://avatar.png"
},
"description": "Ana's avatar"
}
},
{
"type": 9,
"components": [
{
"type": 10,
"content": "**Event notifications**\nGet notified when an event starts."
}
],
"accessory": {
"type": 2,
"style": 3,
"label": "Enable",
"custom_id": "enable_notifications"
}
}
]
}
Field Type Description
type integer required Always 9.
id integer optional Unique identifier in the message.
components array required 1 to 3 Text Display components.
accessory component required A Thumbnail or a Button.

Use the JSON above as the message body.

  • Perfect for lists of options: each row is a Section with its own button.
  • The accessory button works like any other button: you’ll receive its custom_id.
  • Use the Thumbnail’s description as alt text for accessibility.