rust-tg-bot-macros 1.0.0-rc.1

Procedural macros for the rust-tg-bot Telegram framework
Documentation

Procedural macros for the rust-tg-bot Telegram Bot framework.

This crate provides the [BotCommands] derive macro, which turns an enum into a self-parsing command handler with automatic help-text generation and Telegram setMyCommands integration.

Example

use rust_tg_bot_macros::BotCommands;

#[derive(BotCommands, Clone)]
#[command(rename_rule = "lowercase")]
enum Command {
    #[command(description = "Display help text")]
    Help,
    #[command(description = "Start the bot")]
    Start,
    #[command(description = "Set username")]
    Username(String),
    #[command(description = "Set age")]
    Age(u32),
}