telegram-bot

Build production Telegram bots with grammY 1.x webhooks, Mini Apps, and payments.

15|2|Updated May 23, 2026
One-click install
npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill telegram-bot-vkirill
Or copy as Structured Prompt for Agentâ–¼
Please help me install this Agent Skill.
Skill: telegram-bot
Source: https://github.com/VKirill/antigravity-for-claude-code/tree/main/skills/telegram-bot
Command: npx skills add https://github.com/VKirill/antigravity-for-claude-code --skill telegram-bot-vkirill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you build and operate Telegram bots safely without getting stuck on webhook security, payment correctness, or concurrency bugs.

Core Features & Use Cases

  • Production bot architecture on grammY 1.x: typed handlers, sessions, and conversations with deterministic middleware order.
  • Webhook + long-polling reliability: secure secret_token validation, correct allowed_updates, and fixes for 409/timeout issues.
  • Mini Apps and payments done right: server-side initData HMAC validation, Stars (XTR) + Payments 2.0 flows, idempotent grants, and refunds.

Quick Start

Ask your Claude/AI agent: "Design a grammY 1.x Telegram bot with Redis sessions, secure webhook secret_token validation, Mini App initData server-side HMAC verification, and Stars (XTR) payment with idempotent access grant."

Frequently Asked Questions about telegram-bot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Telegram webhook secret_token securely in a grammY bot?â–¼

Validating Telegram webhook secret_token securely in grammY requires constant-time comparison to prevent timing attacks. This Skill implements safe webhook validation alongside correct middleware ordering, ensuring your production bot rejects unauthorized requests reliably.

How do I verify Telegram Mini App initData with HMAC on the server side?â–¼

Verifying Telegram Mini App initData server-side involves checking the HMAC signature against your bot token to prevent client-side spoofing. This Skill provides the correct server-side validation logic to securely authenticate Mini App users.

What's the best way to handle Telegram Stars XTR payments idempotently in grammY?â–¼

Handling Telegram Stars XTR payments idempotently requires tracking immutable payment charge identifiers to prevent duplicate access grants. This Skill implements Payments 2.0 flows with idempotent granting and refund logic for safe transaction processing.

Why does my Telegram bot return 409 conflicts when scaling across multiple instances?â–¼

Telegram bot 409 conflicts during multi-instance scaling occur when multiple processes run long-polling simultaneously without sequentialization. This Skill fixes 409 and timeout issues by configuring correct webhooks, allowed_updates, and deterministic middleware ordering.

Do I need Redis sessions to scale a grammY 1.x Telegram bot horizontally?â–¼

Redis sessions are needed to scale a grammY 1.x Telegram bot horizontally when operating across multiple instances. This Skill designs production bot architectures with typed handlers, Redis-backed sessions, and deterministic sequentialize middleware to ensure consistency.

What is the correct middleware ordering for grammY conversations and sessions?â–¼

Correct grammY middleware ordering for conversations and sessions requires sequentialize before session to ensure deterministic update processing. This Skill configures this exact middleware chain to prevent race conditions and state corruption.