Expand description
Core part of the teloxide library.
This library provides tools for making requests to the Telegram Bot API
(Currently, version 9.1 is supported) with ease. The library is fully
asynchronous and built using tokio.
 teloxide-core = "0.13.0"Compiler support: requires rustc 1.82+.
use teloxide_core::{
    prelude::*,
    types::{DiceEmoji, ParseMode},
};
let bot = Bot::from_env().parse_mode(ParseMode::MarkdownV2);
let me = bot.get_me().await?;
bot.send_dice(chat_id).emoji(DiceEmoji::Dice).await?;
bot.send_message(chat_id, format!("Hi, my name is **{}** ๐", me.user.first_name)).await?; 
 ยงCargo features
- native-tls= use- native-tlstls implementation (enabled by default)
- rustlsโ use- rustlstls implementation
- trace_adaptorโ enables- Tracebot adaptor
- erasedโ enables- ErasedRequesterbot adaptor
- throttleโ enables- Throttlebot adaptor
- cache_meโ enables- CacheMebot adaptor
- fullโ enables all features except- nightlyand tls-related
- nightlyโ enables nightly-only features, currently:- Removes some future boxing using #![feature(type_alias_impl_trait)]
- Used to built docs (#![feature(doc_cfg, doc_notable_trait)])
 
- Removes some future boxing using 
Re-exportsยง
- pub use self::errors::ApiError;
- pub use self::errors::DownloadError;
- pub use self::errors::RequestError;
Modulesยง
- adaptors
- Wrappers altering functionality of a bot.
- errors
- Possible error types.
- net
- Network-specific API.
- payloads
- Request data sent to Telegram.
- prelude
- Commonly used items.
- requests
- Telegram API requests.
- types
- Telegram API types.
Structsยง
- Bot
- A requests sender.