telegram-bot 0.8.0

A library for creating Telegram bots
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::env;

use telegram_bot::{Api, Error, GetMe};

#[tokio::main]
async fn main() -> Result<(), Error> {
    let token = env::var("TELEGRAM_BOT_TOKEN").expect("TELEGRAM_BOT_TOKEN not set");

    let api = Api::new(token);
    let result = api.send(GetMe).await?;
    println!("{:?}", result);
    Ok(())
}