Validation Rules¶
The bot validates your template before creating or updating a panel. If any rule is violated, the operation is rejected and you receive an error message describing the problem.
Button Rules¶
- A button with no
role=attribute must have a label (used for name-based role matching) - A button must have either a label or an
emoji(or both) - Two buttons cannot reference the same role ID.
- Two buttons cannot reference the same template ID.
- Two name-based buttons (no
role=) cannot share the same label (case-insensitive). - Disabled buttons are exempt from all uniqueness rules.
Row Rules¶
- A row cannot contain more than 5 buttons
- A template cannot contain more than 5 rows
Webhook Rules¶
- The
[webhook]namemust be between 1 and 80 characters - The
[webhook]avatarmust be a validhttp://orhttps://URL
Template Button Rules¶
- A template button (
template=) cannot also have arole=attribute (mutually exclusive) - A template button must have a label or an
emoji(or both)
URL Button Rules¶
- A URL button (
url=) cannot also have arole=ortemplate=attribute (mutually exclusive) - A URL button's
urlmust start withhttp://orhttps://
Template ID Rules¶
- A template ID may only contain alphanumeric characters, hyphens, and underscores
- A template ID cannot be longer than 64 characters
Image Rules¶
- An
[image]tag'surlmust start withhttp://orhttps://
Gallery Rules¶
- A
[gallery]must contain at least 1 item and no more than 10 items - Each
[gallery]item'surlmust start withhttp://orhttps://
Section Rules¶
- A
[section]must have between 1 and 3 text children - A
[section]must have exactly 1 accessory ([thumbnail]or[button])
Thumbnail Rules¶
- A
[thumbnail]urlmust start withhttp://orhttps:// - A
[thumbnail]descriptionmust be 256 characters or fewer