Logo Tg Polls

Tg Polls

Cộng đồng
serejaris
tg-polls

Use when sending a Telegram poll or quiz from a bot or a user account (Telethon/MTProto): one-message post with text plus poll (poll description), media on the poll or on options, up to 12 options, multiple answers, participants adding options, revoting, shuffle, hidden results, members-only and country-limited voting, quiz with several correct answers. Also use to decide whether text and poll fit in one message.

Tổng quan

Nhà phát hànhserejaris
Kho mãtelegram-skills
Tên kỹ năngtg-polls
Sao
35
Bản fork
4
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được serejaris công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Tg Polls trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/serejaris/telegram-skills/tree/main/skills/tg-polls
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/serejaris/telegram-skills.git /tmp/telegram-skills
mkdir -p .claude/skills
cp -r /tmp/telegram-skills/skills/tg-polls .claude/skills/tg-polls
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Tg Polls trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Tg Polls ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Tg Polls với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

tg-polls

Checked against the official docs on 2026-10-16: Bot API 10.3 (latest, August 24, 2026), MTProto layer 225+ (poll, inputMediaPoll), Telegram blog post of 2026-03-31 "AI Editor, Mighty Polls…".

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.

NeedBot API (sendPoll)User account (MTProto / Telethon)
Post text above the polldescription, 0–1024 chars after entities parsing; description_parse_mode / description_entitiesmessage of messages.sendMedia with media=inputMediaPoll (Telethon: send_file(chat, InputMediaPoll(...), caption=TEXT))
One photo/video/file on the pollmedia (InputPollMedia: animation, audio, document, live photo, location, photo, venue, video)inputMediaPoll.attached_media
Media on an optionInputPollOption.media (animation, link, live photo, location, photo, sticker, venue, video)inputPollAnswer.media
Text longer than 1024 charsseparate message first (for example a rich message), poll secondsame

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 has no separate description field in poll / inputMediaPoll. The caption is the description. Verified 2026-10-16 with Telethon 1.44 (layer 227) in a self-chat: the server accepted a 12-option poll with a caption and returned the text in message.message.

Limits

WhatLimitSince
Options1–12 (poll_answers_max = 12 in client config)max 12 in Bot API 9.1, min 1 in 10.0
Question1–300 chars; only custom emoji entities
Option text1–100 chars; only custom emoji entities
Description0–1024 chars9.6
Quiz explanation0–200 chars, at most 2 line feeds; explanation_mediamedia in 10.0
open_period / close_date5–2628000 s, not both9.6
country_codes0–12 ISO codes, channels only; FT = anonymous numbers10.0

Older code often hardcodes 10 options. Remove that check: it rejects valid 11- and 12-option polls.

Settings

Bot API name → MTProto flag on poll:

  • allows_multiple_answers → multiple_choice. Default off; turn it on when people combine tools.
  • is_anonymous (default true) → inverse of public_voters.
  • allow_adding_options → open_answers. Participants suggest options in an active poll; not for anonymous polls and quizzes. MTProto: messages.addPollAnswer, a participant may delete own answer within poll_answer_delete_period (300 s).
  • allows_revoting (default true for regular polls, false for quizzes) → inverse of revoting_disabled.
  • shuffle_options → shuffle_answers.
  • hide_results_until_closes → hide_results_until_close.
  • members_only → subscribers_only: only members for more than 24 h; channels only.
  • country_codes → countries_iso2.
  • Quiz: type: "quiz" + correct_option_ids (several correct answers allowed since 9.6) → quiz + inputMediaPoll.correct_answers.

chat_id can't be a channel direct messages chat.

Bot API example

bash
curl -s "https://api.telegram.org/bot$TOKEN/sendPoll" \
  -H 'Content-Type: application/json' \
  -d '{
    "chat_id": "@your_channel",
    "question": "Where do you track tasks when agents write the code?",
    "description": "Backlog, release plans, what to do tomorrow. Pick several if you combine tools.",
    "options": [{"text": "Jira"}, {"text": "Linear"}, {"text": "GitHub / GitLab Issues"},
                {"text": "Notion"}, {"text": "Obsidian"}, {"text": "Markdown files in the repo"},
                {"text": "Other (in comments)"}],
    "is_anonymous": true,
    "allows_multiple_answers": true
  }'

Telethon example

python
from telethon.tl.types import InputMediaPoll, Poll, PollAnswer, TextWithEntities

answers = [PollAnswer(text=TextWithEntities(text=o, entities=[]), option=bytes([i]))
           for i, o in enumerate(options)]          # up to 12
poll = Poll(id=0, hash=0, question=TextWithEntities(text=question, entities=[]),
            answers=answers, multiple_choice=True)
await client.send_file(chat, InputMediaPoll(poll=poll), caption=post_text)  # caption = description

Before sending

  1. Preview in your own chat (Saved Messages or a bot DM), then send to the audience.
  2. Options and question within the limits above; description ≤ 1024.
  3. A sent poll can't be edited: Bot API has no method for its question or options, and the description is frozen too. Verified 2026-10-16 from a user account: messages.editMessage with new text on a poll returns MESSAGE_NOT_MODIFIED, and Telegram apps show no Edit for polls. Fix mistakes in the preview; a correction is a new poll.

Sources

Câu hỏi thường gặp

Kỹ năng AI Tg Polls làm được gì?

Use when sending a Telegram poll or quiz from a bot or a user account (Telethon/MTProto): one-message post with text plus poll (poll description), media on the poll or on options, up to 12 options, multiple answers, participants adding options, revoting, shuffle, hidden results, members-only and country-limited voting, quiz with several correct answers. Also use to decide whether text and poll fit in one message.

Vì sao nên dùng Tg Polls trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Tg Polls là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Tg Polls trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/serejaris/telegram-skills/tree/main/skills/tg-polls. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Tg Polls?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Tg Polls với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Tg Polls với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Tg Polls có miễn phí không?

Có. Kỹ năng này được serejaris phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇