nestjs-telegraf

Build Telegram bots with NestJS using nestjs-telegraf decorators and Telegraf v4.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/1t1sCooL/zazyvala-bot --skill nestjs-telegraf-1t1scool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nestjs-telegraf
Source: https://github.com/1t1sCooL/zazyvala-bot/tree/main/.claude/skills/nestjs-telegraf
Command: npx skills add https://github.com/1t1sCooL/zazyvala-bot --skill nestjs-telegraf-1t1scool

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires nestjs-telegraf, telegraf, and includes references (resource) components.

What problem does it solve? Building a Telegram bot on NestJS requires wiring Telegraf into the dependency injection system, handling group membership updates, mentioning users reliably, and respecting Telegram rate limits — all of which involve non-obvious patterns and platform limits that are easy to get wrong. ## Core Features & Use Cases - Module and handler setup: Configure TelegrafModule asynchronously with ConfigService, and write thin @Update handler classes using decorators like @Start, @Command, @Hears, @On, and @Action while keeping business logic in injectable services. - Tag-everyone mechanics: Track group members via new_chat_members/left_chat_member updates, mention users without usernames through text_mention entities, and batch mentions under Telegram's notification and message-size limits. - Scenes, guards, and error handling: Build multi-step wizard flows with session middleware, enforce summon permissions with NestJS guards, and handle 429 flood errors with retry-after backoff. - Use Case: You are building a bot that tags all members of a Telegram group on command. Use this Skill to set up the module, register members from updates, and send batched text_mention messages with flood-safe retries. ## Quick Start Ask the assistant to scaffold a NestJS Telegram bot with nestjs-telegraf that replies to /start and implements a /call command mentioning all registered group members in batches.

Frequently Asked Questions about nestjs-telegraf

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

FAQPage Schema
How do I build a Telegram bot with NestJS and Telegraf?

Use the nestjs-telegraf package, which wraps Telegraf v4 as a NestJS module. Configure TelegrafModule.forRootAsync with a ConfigService-provided bot token, then create @Update classes whose methods use decorators like @Start, @Command, and @On to handle updates with full dependency injection.

How to mention all users in a Telegram group with a bot?

Telegram bots cannot list group members, so build a registry from new_chat_members, left_chat_member, and message updates. Mention users without usernames via text_mention entities linked to their user id, and split mentions into batches of about five per message since only a few mentions notify per message.

Should a Telegram bot use long polling or webhook?

Use long polling in development since it needs no public URL; simply omit launchOptions. For production, set launchOptions.webhook with your domain and path so Telegram pushes updates to your server, and validate the secret token header when terminating TLS yourself.

Why does my Telegram bot get 429 flood control errors?

Telegram enforces rate limits of roughly 30 messages per second globally and about one per second per chat, returning 429 with a retry_after parameter. Wrap sends in a retry helper that sleeps for retry_after seconds, and add delays between batched mention messages.

Does nestjs-telegraf support multi-step dialogs and wizards?

Yes, it supports Telegraf scenes and wizards through @Scene, @SceneEnter, @Wizard, and @WizardStep decorators. You must register the session() middleware in the module options, and for production use a persistent session store instead of the in-memory default.