Skip to main content

botkit_core/
lib.rs

1//! Platform-agnostic building blocks for the botkit bot framework.
2//!
3//! Handlers are plain async functions. They declare what they need as
4//! parameters ([`FromContext`] extractors) and return anything that converts
5//! into a [`Response`] ([`IntoResponse`]). Adapters translate their platform's
6//! payloads into a [`Context`] and route them through a [`BotBuilder`].
7
8pub mod action;
9mod bot;
10mod context;
11mod error;
12mod extractor;
13mod handler;
14mod responder;
15mod response;
16mod shutdown;
17#[cfg(test)]
18mod test_util;
19pub mod types;
20
21pub use action::{AnyChatActionSender, ChatAction, ChatActionGuard, ChatActionSender};
22pub use bot::{Bot, BotBuilder, CommandInfo, Event};
23pub use context::{Context, ContextData, OptionValue};
24pub use error::BotError;
25pub use extractor::{
26    ButtonId, Channel, CommandArgs, CommandName, FromContext, MessageContent, Typing, User,
27};
28pub use handler::{AnyHandler, Handler, IntoHandler};
29pub use responder::IntoResponse;
30pub use response::{FileResponse, FileSource, Response};
31pub use shutdown::{Shutdown, ShutdownSignal};