#bot #bot-api

botway-rs

Rust client package for Botway

5 releases

0.2.11 Jun 30, 2022
0.2.2 Sep 17, 2022
0.2.1 Jun 30, 2022
0.2.0 May 7, 2022
0.1.0 May 4, 2022

#61 in #bot-api

MIT and GPL-3.0-only

5KB
55 lines

botway-rs

Rust client package for Botway


Crates.io

Installation

[dependencies]
botway-rs = "0.2.11"

Usage

after creating a new rust botway project, you need to use your tokens to connect with your bot.

use teloxide::{prelude::*, utils::command::BotCommands};
use std::error::Error;
use botway_rs::get;

#[tokio::main]
async fn main() {
    pretty_env_logger::init();
    log::info!("Starting command bot...");

    let bot = Bot::new(get("token"));

    teloxide::commands_repl(bot, answer, Command::ty()).await;
}
...

Dependencies

~1.1–2MB
~35K SLoC