Messages
LiveMessage, media and button editor
Complete Defendy editor reference for greetings, farewells, rules and reputation notifications: formatting, variables, media, previews, protection and inline buttons.
The editor is shared by greetings, farewells, rules and reputation notifications. Each phrase is stored separately and can be enabled, selected as the default, or included in random rotation.
Text and length
| State | Maximum visible length |
|---|---|
| Text only | 4,096 characters |
| Text with photo, video or GIF | 1,024 caption characters |
The counter measures the visible result, not markup. In greetings and farewells, {rules} is counted after the rules text is inserted. A phrase cannot be saved if that expanded text exceeds the limit. {rules} is forbidden inside the rules themselves to prevent recursion.
Formatting controls
| Control | Result |
|---|---|
| B, I, U, S | Bold, italic, underline and strikethrough. |
</> and code block | Inline monospace or a separate preformatted block. |
| Quote / expandable quote | Standard or collapsible Telegram quote. |
| Spoiler | Hides a fragment until tapped. |
| A / 𝙼 | Full-width or decorative monospace text. |
inv, ↵, •, — | Invisible separator, line break, bullet or list dash. |
| Link | Applies a URL to selected text. javascript: and data: are rejected. |
| ✨ | Inserts a Telegram premium emoji available to the group. |
The editor reports malformed or incompatible markup before save. Insert template variables with the chips below the field to avoid spelling errors.
Greeting, farewell and rules variables
| Variable | Replacement |
|---|---|
{name} | Member display name. |
{username} | @username when present. |
{mention} | Clickable member mention. |
{group} | Group name. |
{member_count} | Current member count. Legacy aliases {members_count} and {membercount} also work. |
{rules} | Active rules text. Use in greetings or farewells, never inside the rules. |
Reputation notifications use a separate set: target ({mention}, {name}, {username}), voter ({voter_mention}, {voter_name}), change and total ({delta}, {rating}), rank ({rank_emoji}, {rank_name}), and {group}. Overtake messages use {overtaken_mention}, {overtaken_name} and {position} instead of voter data.
Media
| Type | Formats | Maximum size |
|---|---|---|
| Photo | JPEG, PNG, WebP | 10 MB |
| Animation | GIF | 10 MB |
| Video | MP4, WebM | 50 MB |
Adding media changes the text limit to 1,024 characters. “Caption above media” changes caption placement. When replacing a file, wait for the new preview before saving.
Sending options
| Setting | Default | Effect |
|---|---|---|
| Disable link preview | Off | Stops Telegram from expanding a web link into a card. Unavailable when media is attached. |
| Caption above media | Off | Places the caption before the attachment. Visible only for a phrase with media. |
| Protect content | Off | Asks Telegram to prevent forwarding and saving. Stored per phrase. |
| Active phrase | On for a used phrase | An inactive phrase stays saved but is not sent. |
| Default phrase | Index 0 when rotation is off | Used when random phrase selection is disabled. |
Inline buttons
You can create up to 8 rows with up to 8 buttons per row.
| Field | Limit | Meaning |
|---|---|---|
| Button text | 64 characters | User-facing label. |
| URL type | URL up to 2,048 characters | https://, http://, tg:// or @username. The WebApp converts usernames into Telegram links. |
| Popup type | 200 characters | Short toast after a tap. |
| Alert type | 200 characters | Modal alert after a tap. |
| Copy type | 256 characters | Text Telegram copies for the user. |
| Style | Default, primary, success, danger | Standard, blue, green or red in supported Telegram clients. |
Do not put secrets in popup, alert or copied text. Button payloads are stored with the phrase and are visible to group administrators.
Safe verification
- Create one test phrase and keep the others inactive.
- Check preview, expanded variable length and every button.
- Send it in a test group. The WebApp preview is representative, but the Telegram client performs the final rendering.
- Enable random rotation only after each phrase has been tested.