setup-bot-handlers

Configure Telegram bot event handlers using Kotlin DSL or KSP annotations.

247|18|Updated May 26, 2022
One-click install
npx skills add https://github.com/vendelieu/telegram-bot --skill setup-bot-handlers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-bot-handlers
Source: https://github.com/vendelieu/telegram-bot/tree/main/.cursor/skills/bot-user/setup-bot-handlers
Command: npx skills add https://github.com/vendelieu/telegram-bot --skill setup-bot-handlers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the process of defining how your Telegram bot responds to user interactions, whether through commands, text inputs, or other update types.

Core Features & Use Cases

  • Flexible Handler Definition: Supports both a fluent Domain Specific Language (DSL) and annotation-based approaches for setting up handlers.
  • Multiple Handler Types: Covers commands, single-step and multi-step inputs, common text/regex matching, specific update types, and fallback handlers.
  • Advanced Features: Includes support for guards, rate limiting, and custom argument parsing to build robust bot logic.
  • Use Case: A developer needs to quickly set up a /help command, handle user replies to a specific question, and ensure only registered users can interact with certain features.

Quick Start

Use the setup-bot-handlers skill to define a new command handler for the '/greet' command.

Frequently Asked Questions about setup-bot-handlers

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

FAQPage Schema
How do I configure Telegram bot handlers for commands and text inputs?

Configure Telegram bot handlers by using either a Kotlin DSL or KSP annotations to define how your bot responds to commands, text inputs, and other update types.

Can I use KSP annotations instead of a Kotlin DSL for Telegram bot development?

Yes, you can use KSP annotations as an alternative to the Kotlin DSL for setting up your Telegram bot handlers, offering a flexible approach to defining bot interactions.

How do I add rate limiting and guards to a Telegram bot command handler?

Add rate limiting and guards to your Telegram bot command handlers by utilizing the advanced configuration options provided during handler setup to build robust bot logic.

What is the best way to handle multi-step user inputs in a Telegram bot?

Handle multi-step user inputs in a Telegram bot by defining specific input handlers that support sequential user replies, abstracting the underlying API interactions.

Does this approach support regex matching for Telegram bot messages?

Yes, the handler configuration supports common text and regex matching, allowing your Telegram bot to respond to specific message patterns.

How do I parse arguments from a Telegram bot command?

Parse arguments from a Telegram bot command by using the custom argument parsing features included within the handler configuration setup.