botway-rs

Crates.iobotway-rs
lib.rsbotway-rs
version0.2.2
sourcesrc
created_at2022-05-04 10:31:46.414525
updated_at2022-09-17 07:47:32.235789
descriptionRust client package for Botway.
homepage
repositoryhttps://github.com/abdfnx/botway
max_upload_size
id580322
size4,781
Abdfn (abdfnx)

documentation

README

botway-rs

Rust client package for Botway


Crates.io

Installation

  • Cargo.toml
[dependencies]
botway-rs = "0.2.2"
  • CLI
cargo add botway-rs

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

cargo fmt