tg-polls
tg-polls
Checked against the official docs on 2026-10-30: Bot API 10.3 (latest, August 24, 2026), MTProto layer 225+ (poll, inputMediaPoll), Telegram blog post of 2026-03-31 "AI Editor, Mighty Polls…". Nothing here was run against a live bot.
One message: text + poll
A post and its poll fit in one message. Put the post text into the poll description, not into a separate message.
| Need | Bot API (sendPoll) |
User account (MTProto / Telethon) |
|---|---|---|
| Post text above the poll | description, 0–1024 chars after entities parsing; description_parse_mode / description_entities |
message of messages.sendMedia with media=inputMediaPoll (Telethon: send_file(chat, InputMediaPoll(...), caption=TEXT)) |
| One photo/video/file on the poll | media (InputPollMedia: animation, audio, document, live photo, location, photo, venue, video) |
inputMediaPoll.attached_media |
| Media on an option | InputPollOption.media (animation, link, live photo, location, photo, sticker, venue, video) |
inputPollAnswer.media |
| Text longer than 1024 chars | separate message first (for example a rich message), poll second | same |
A poll can't go inside a rich message (no poll block among the 24 InputRichBlock types), into an album (sendMediaGroup takes audio, document, live photo, photo, video only) or into sendMessage.
MTProto attached_media does not accept a freshly uploaded file: inputMediaUploadedPhoto returns ATTACH_MEDIA_INVALID. Upload first with messages.uploadMedia, then pass inputMediaPhoto with the returned photo's id, access hash and file reference. Verified 2026-11-11 in a self-chat: 12 options plus a photo, read back as messageMediaPoll with attached_media.