6个版本
| 0.0.7 | 2021年10月20日 | 
|---|---|
| 0.0.6 | 2021年10月19日 | 
| 0.0.4 | 2021年7月27日 | 
| 0.0.1 | 2021年1月26日 | 
#7 in #trying
46KB
 1K  SLoC
试点
试点项目操作Telegram机器人
此项目处于高度开发中,名称也将在后续版本中更改,请在尝试时慎重考虑。
开始使用
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;
}
依赖关系
~6–18MB
~277K SLoC