Expand description
Platform-agnostic building blocks for the botkit bot framework.
Handlers are plain async functions. They declare what they need as
parameters (FromContext extractors) and return anything that converts
into a Response (IntoResponse). Adapters translate their platform’s
payloads into a Context and route them through a BotBuilder.
Re-exports§
pub use action::AnyChatActionSender;pub use action::ChatAction;pub use action::ChatActionGuard;pub use action::ChatActionSender;
Modules§
Structs§
- AnyHandler
- Type-erased
Handlerhandle - BotBuilder
- Builder for constructing bots with handlers
- Button
Id - Button/callback ID extractor
- Channel
- Channel information extractor
- Command
Args - Command arguments extractor (Telegram-style string args)
- Command
Info - A registered command and the description shown in platform command menus
- Command
Name - Command name extractor
- Context
- Context for handling bot events
- File
Response - Bytes to upload, plus how to present them
- Message
Content - Message content extractor
- Response
- Unified bot response builder
- Shutdown
- The receiving half of a shutdown signal, handed to
crate::Bot::run_until - Shutdown
Signal - Signals a running bot to stop
- Typing
- Typing indicator extractor
- User
- User information extractor
Enums§
- BotError
- Main error type for bot operations
- Event
- An incoming event, resolved to the shape the router dispatches on
- File
Source - Where a file response’s bytes come from
- Option
Value - Command option value
Traits§
- Bot
- Unified Bot trait that hides connection mode differences
- Context
Data - Trait implemented by platform-specific context data
- From
Context - Trait for extracting typed data from bot context
- Handler
- Trait for bot event handlers
- Into
Handler - Trait to convert functions into handlers
- Into
Response - Trait for converting types into bot responses