telegram_bot_api_rs 0.1.1

Telegram Bot Api Rust Library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use anyhow::Result;
use telegram_bot_api_rs::{available_methods::payload::SendMessagePayload, bot::Bot};
#[tokio::main]
async fn main() -> Result<()> {
    tracing_subscriber::fmt::init();
    let token = std::env::var("TOKEN").expect("TOKEN is not Set");
    let bot = Bot::new(token);
    bot.send_message(&SendMessagePayload {
        chat_id: todo!(),
        text: todo!(),
        ..Default::default()
    })
    .await
    .unwrap();
    Ok(())
}