telegram-bot-api-inline-mode-and-callbacks
SKILL.md
Telegram Bot API: Inline Mode and Callbacks
Purpose
Use this skill when the bot must work outside its own chat or when buttons drive stateful interactions.
Core API surface
inline_querychosen_inline_resultanswerInlineQuerycallback_queryanswerCallbackQuery- inline result types
- inline keyboards and
callback_data
Inline mode guidance
- Enable inline mode in
@BotFather. - Build stateless or lightly stateful search flows.
- Use compact result identifiers and stable pagination offsets.
- Treat every URL in inline results as public.
- Personalize only when justified and set caching flags accordingly.
Callback-query guidance
- Always call
answerCallbackQuery, even for silent acknowledgements. - Keep
callback_datacompact and versioned. - Design callbacks so they can be replayed safely.
- Prefer editing the original message over sending a new one.
Design patterns
- Search-select-send for inline content pickers
- Inline search plus deep link back to private chat for auth/setup
- Callback-driven settings menu with message edits
- Pagination using encoded cursor state
Common mistakes
- Forgetting to acknowledge callback queries.
- Storing too much mutable state in
callback_data. - Returning overly large or slow inline result sets.
- Assuming inline messages can always upload new files during edits.
Read next
03-messages-and-formatting14-mini-apps-and-attachment-menu15-web-login-and-deep-linking
Weekly Installs
2
Repository
nzhulikov/teleg…t-skillsFirst Seen
11 days ago
Security Audits
Installed on
amp2
cline2
opencode2
cursor2
kimi-cli2
codex2