6 releases

0.0.7 Oct 20, 2021
0.0.6 Oct 19, 2021
0.0.4 Jul 27, 2021
0.0.1 Jan 26, 2021

#9 in #trying

28 downloads per month

MIT license

46KB
1K SLoC

Pilot

the pilot manipulating telegram bot

this project is highly WIP, and the name would also be renamed in the later release, please be really deep considering when trying it.

Get started

use pilot::{Bot, UpdateMessage, SendMessage};
async fn main() {
    let mut bot = Bot::new();
    bot.command("ping", |bot, msg| async move {
        match msg.as_ref() {
            UpdateMessage::Message(msg) => {
                let message = SendMessage::new(msg.chat.id.to_string(), "pong");
                bot.request(message).await;
            }
            _ => {}
        }
    });
    bot.polling().await;
}

Dependencies

~7–19MB
~261K SLoC