telegram-bot-builder
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api,
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.
How to use
Przygotuj środowisko — zainstaluj Node.js lub Python oraz wybraną bibliotekę (Telegraf dla Node.js lub python-telegram-bot dla Pythona). Utwórz token bota w BotFather na Telegramie i zapisz go w zmiennej środowiskowej BOT_TOKEN.
Skonfiguruj strukturę projektu — utwórz katalog src/ z plikami bot.js (inicjalizacja) i poddirectories dla handlerów poleceń (commands/) oraz logiki biznesowej. Struktura powinna być modularna, aby łatwo dodawać nowe funkcje.
Zaimplementuj podstawowe handlery — dodaj obsługę poleceń /start i /help, które odpowiadają na wiadomości użytkownika. Użyj handlera on('text') do przetwarzania wiadomości tekstowych i odpowiadania kontekstowo.
Dodaj interfejs użytkownika — zaimplementuj inline keyboards dla interaktywnych przycisków, które poprawiają doświadczenie użytkownika. Zapewni to naturalną konwersację zamiast tekstowych poleceń.
Uruchom bota — wywołaj bot.launch() i ustaw handlery dla SIGINT/SIGTERM, aby bot mógł się gracefully wyłączyć. Przetestuj wszystkie polecenia w Telegramie.
Rozszerz funkcjonalność — dodaj webhook management do obsługi zdarzeń w skali, implementuj analytics do śledzenia użytkowników i ich interakcji, oraz zaplanuj monetyzację (premium features, reklamy, API access).