mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-10 20:12:25 +01:00
🤖 An elegant Telegram bots framework for Rust
https://docs.rs/teloxide
c7e32fa247
`HasPayload::with_payload_mut` allows to easily apply multiple changes to the payload without calling `payload_mut()` multiple times and creating temporary variable for the request. e.g.: ```rust // without `with_payload_mut` { let mut req = bot.set_webhook(url.clone()); req.payload_mut().certificate = certificate.take(); req.payload_mut().drop_pending_updates = drop_pending_updates; req.send().await?; } // with `with_payload_mut` bot .set_webhook(url.clone()) .with_payload_mut(|payload| { payload.certificate = certificate.take(); payload.drop_pending_updates = drop_pending_updates; }) .send() .await? ``` |
||
---|---|---|
.cargo | ||
.github/workflows | ||
examples | ||
media | ||
src | ||
.gitignore | ||
Cargo.toml | ||
CHANGELOG.md | ||
LICENSE | ||
netlify.toml | ||
README.md | ||
rust-toolchain.toml | ||
rustfmt.toml |
teloxide-core
The core part of teloxide
providing tools for making requests to the Telegram Bot API with ease. This library is fully asynchronous and built using tokio
.
teloxide-core = "0.4"
Compiler support: requires rustc 1.49+.