Crate teloxide[−][src]
A full-featured framework that empowers you to easily build Telegram bots
using the async
/.await
syntax in Rust. It handles all the difficult
stuff so you can focus only on your business logic.
For a high-level overview, see our GitHub repository.
(Full)
use teloxide::prelude::*; teloxide::enable_logging!(); log::info!("Starting dices_bot..."); let bot = Bot::from_env().auto_send(); teloxide::repl(bot, |message| async move { message.answer_dice().await?; respond(()) }) .await;
Re-exports
pub use teloxide_macros as macros; |
Modules
adaptors | Wrappers altering functionality of a bot. |
dispatching | Updates dispatching. |
error_handlers | Convenient error handling. |
net | Network-specific API. |
payloads | Request data sent to Telegram. |
prelude | Commonly used items. |
prelude | Commonly used items. |
requests | Telegram API requests. |
types | Telergam API types. |
utils | Some useful utilities. |
Macros
enable_logging | Enables logging through pretty-env-logger. |
enable_logging_with_filter | Enables logging through pretty-env-logger with a custom filter for your program. |
Structs
Bot | A requests sender. |
Enums
ApiError | A kind of an API error. |
DownloadError | An error caused by downloading a file. |
RequestError | An error caused by sending a request to Telegram. |
Functions
commands_repl | A REPL for commands. |
commands_repl_with_listener | Like |
dialogues_repl | A REPL for dialogues. |
dialogues_repl_with_listener | Like |
repl | A REPL for messages. |
repl_with_listener | Like |
respond | A shortcut for |
Attribute Macros
teloxide | macros The docs is below. |