frakti 0.1.3

Telegram bot API client for Rust, with a focus on single-threaded async runtime support
Documentation
use frakti::client_cyper::Bot;
use frakti::AsyncTelegramApi;

#[compio::main]
async fn main() {
    let token = std::env::var("BOT_TOKEN").expect("Should have BOT_TOKEN as environment variable");

    let bot = Bot::new(&token);

    match bot.get_me().await {
        Ok(response) => {
            let user = response.result;
            println!(
                "Hello, I'm @{}, https://t.me/{}",
                user.first_name,
                user.username.expect("The bot must have a username.")
            );
        }
        Err(error) => {
            eprintln!("Failed to get me: {error:?}");
        }
    }
}