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 or disabled. Greetings and farewells support a default text and random selection; /rules uses the first active rules text.
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 buttons 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 | Selected text when random selection 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 | Brief pop-up message after a tap. |
| Alert type | 200 characters | Pop-up message that the reader dismisses 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.
Example text
For a greeting: Hi, {mention}! Welcome to {group}. When Anna joins “Book Club”, the bot inserts Anna’s clickable mention and the group name. Add variables using the editor buttons and save the text.
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.
What saves immediately
For an existing phrase, media, delivery options and buttons can save separately as you change them. Edited text or captions still require Save. Leaving without saving the text does not undo a media change that was already saved. Finish a new phrase using the form’s Save button.