pilot

Crates.iopilot
lib.rspilot
version0.0.7
sourcesrc
created_at2021-01-26 06:37:25.657484
updated_at2021-10-20 02:37:15.729731
descriptionthe pilot manipulating telegram bot
homepage
repository
max_upload_size
id346771
size46,040
Kilerd Chan (Kilerd)

documentation

README

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;
}
Commit count: 0

cargo fmt