Separator
type: 14
Messages
Preview payload.json
The Separator adds space between components and, optionally, a divider line. It helps your message breathe and read better.
{ "flags": 32768, "components": [ { "type": 17, "components": [ { "type": 10, "content": "Small separator **with a line** 👇" }, { "type": 14, "divider": true, "spacing": 1 }, { "type": 10, "content": "Large separator **with a line** 👇" }, { "type": 14, "divider": true, "spacing": 2 }, { "type": 10, "content": "Large separator **without a line** (just space) 👇" }, { "type": 14, "divider": false, "spacing": 2 }, { "type": 10, "content": "End of message." } ] } ]}Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
type |
integer | required Always 14. |
id |
integer | optional Unique identifier in the message. |
divider |
boolean | optional Show the line. Defaults to true. |
spacing |
integer | optional Space size: 1 = small, 2 = large. Defaults to 1. |
{ "type": 14, "divider": true, "spacing": 2 }import { SeparatorBuilder, SeparatorSpacingSize } from 'discord.js';
const small = new SeparatorBuilder(); // line + small spaceconst large = new SeparatorBuilder().setSpacing(SeparatorSpacingSize.Large);const space = new SeparatorBuilder().setDivider(false).setSpacing(SeparatorSpacingSize.Large);small = discord.ui.Separator() # line + small spacelarge = discord.ui.Separator(spacing=discord.SeparatorSpacing.large)space = discord.ui.Separator(visible=False, spacing=discord.SeparatorSpacing.large)large := discordgo.SeparatorSpacingSizeLargenoLine := false
small := discordgo.Separator{} // line + small spacebig := discordgo.Separator{Spacing: &large}space := discordgo.Separator{Divider: &noLine, Spacing: &large}- Use the line to separate different topics and space only to add breathing room within the same topic.
- Don’t overdo it: every Separator counts toward the 40-component limit.