# Telegram and Discord

Source: https://ampost.io/docs/telegram-discord-posts · Full reference: https://ampost.io/llms-full.txt

### Telegram

- To post to Telegram, name `telegram` in `targets[].platforms`; its settings go in `options.telegram`.
- Text up to 4096 characters. Links: `linkUrl` supported. Scheduling: yes.
- First comment: not supported.
- Thread: not supported.
- Alt text (`media[].altText`): not supported (ignored with a warning).
- Media: optional; image and video, up to 10 items.
- Media sent as is within: image jpeg/png, ≤ 10 MB, ≤ 5000 px, 1:20 to 20:1; video h264, ≤ 50 MB.
- Options: `text`, `parseMode`, `disableNotification`, `protectContent`, `disableLinkPreview`, `sendAsDocument`.
- Telegram posts as the user's own bot in a channel or group. Text up to 4096 characters (markup included); with media the caption holds 1024, and longer text follows the media as a second message. Up to 10 photos or videos as an album. `options.telegram`: `parseMode` (`MarkdownV2` or `HTML`; omit it for plain text) formats the text. In MarkdownV2 write `\` before each `_*[]()~`>#+-=|{}.!` that is not formatting; in HTML write `&lt;`, `&gt;`, `&amp;` for literal characters and use only Telegram's tags (`b`, `i`, `u`, `s`, `a href`, `code`, `pre`, `blockquote`, `tg-spoiler`, ...). Ampost escapes `linkUrl` itself and refuses text it can tell Telegram cannot parse (`VALIDATION_FAILED`, `details.field` `text`, naming the character). `disableNotification` sends silently, `protectContent` blocks forwarding and saving, `disableLinkPreview` drops the link preview of a text message, and `sendAsDocument` sends the media as files (several as one album of files) so Telegram does not recompress them; Ampost still converts media to Telegram's photo and video limits first. Edits keep `parseMode`.

### Discord

- To post to Discord, name `discord` in `targets[].platforms`; its settings go in `options.discord`.
- Text up to 2000 characters. Links: `linkUrl` supported. Scheduling: yes.
- First comment: not supported.
- Thread: not supported.
- Alt text (`media[].altText`): up to 1024 characters on images and videos.
- Media: optional; image and video, up to 10 items.
- Media sent as is within: image jpeg/png/webp, ≤ 10 MB; video h264/vp8/vp9, ≤ 10 MB.
- Options: `text`, `embeds`, `username`, `avatarUrl`, `threadName`, `poll`.
- Discord posts to one channel through a webhook: text up to 2000 characters and up to 10 attachments of 10 MB each. Mentions in the text never ping anyone. `options.discord`: `embeds` (up to 10, each with `title` 256, `description` 4096, `url`, `color` as an integer or `#RRGGBB`, `imageUrl` (https; Discord fetches it), and up to 25 `fields` of `name` 256, `value` 1024, `inline`; all embeds together at most 6000 characters), `username` (80, no "clyde" or "discord") and `avatarUrl` (https) to post under another name and picture, `threadName` (100) to start a post in a forum or media channel (required there, refused elsewhere), and `poll` (`question` 300, 2-10 `answers` of 55, `durationHours` 1-768, default 24, `allowMultiselect`). Edits change only the text: embeds and polls stay, and polls cannot be edited.
