bots

Develop production-ready Telegram bots with GrammY, sessions, and payments.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/nsvk13/skills --skill bots-nsvk13
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bots
Source: https://github.com/nsvk13/skills/tree/main/bots
Command: npx skills add https://github.com/nsvk13/skills --skill bots-nsvk13

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design and implement Telegram bots that work reliably in production, including stateful conversations, correct UI flows, payments/subscriptions, and robust error handling under Telegram API constraints.

Core Features & Use Cases

  • GrammY-first architecture: Strong TypeScript context typing, global error handling, and graceful shutdown so you don’t lose updates.
  • Menus, inline keyboards, and callback flows: Build interactive UX with dynamic menus and reliable callback processing.
  • FSM-style conversation state: Use session-driven steps for multi-stage registration/checkout and other conversation flows.
  • Payments and subscriptions: Implement Telegram Stars flows with pre-checkout validation and successful-payment activation.
  • Webhook vs polling deployment patterns: Production webhook handling with secret tokens and webhook setup/teardown guidance.
  • Middleware access control & throttling-friendly patterns: Private-chat gating, subscription checks, admin-only commands, and rate-limit-aware messaging.
  • Session storage options: Redis adapter patterns for persistence and scalability (plus guidance for SQL-backed storage).

Quick Start

Use the bots skill to design a GrammY Telegram bot with a multi-step registration conversation, inline keyboard confirmations, and Telegram Stars subscription payments.

Frequently Asked Questions about bots

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

FAQPage Schema
How do I build a Telegram bot with GrammY that handles multi-step conversations?

GrammY Telegram bots manage multi-step conversations using session-driven FSM-style state for multi-stage registration and checkout flows. Session storage maintains conversation context, enabling reliable interactive UX with dynamic menus and inline keyboards.

How do I set up a secure webhook for a GrammY Telegram bot in production?

Set up secure GrammY webhooks using secret tokens for validation and proper webhook setup and teardown procedures. Production patterns handle graceful shutdown to avoid losing updates, with strong error handling for GrammYError and HttpError under Telegram API constraints.

How do I accept Telegram Stars payments in a Telegram bot?

Accept Telegram Stars payments by implementing pre-checkout validation and successful-payment activation flows. The bot handles subscription payments through Telegram Bot API payment flows, validating transactions before activation to ensure reliable processing under API limits.

Can I use Redis for session storage in a GrammY Telegram bot?

Use Redis adapter patterns for GrammY session storage to achieve persistence and scalability. SQL-backed storage guidance is also available. Session storage enables FSM-style conversation state and middleware access control for private-chat gating and subscription checks.

How do I implement access control and throttling in a Telegram bot?

Implement Telegram bot access control using deterministic middleware for private-chat gating, subscription checks, and admin-only commands. Rate-limit-aware messaging patterns handle Telegram API constraints, while session-backed storage maintains user permissions across interactions.

What is the best way to handle errors in a GrammY Telegram bot?

Handle GrammY errors using global error handling that catches GrammYError and HttpError instances. Production-ready architecture includes graceful shutdown to prevent lost updates, strong TypeScript context typing, and awareness of Telegram API limits for robust error handling.