| Crates.io | botway-rs |
| lib.rs | botway-rs |
| version | 0.2.2 |
| created_at | 2022-05-04 10:31:46.414525+00 |
| updated_at | 2022-09-17 07:47:32.235789+00 |
| description | Rust client package for Botway. |
| homepage | |
| repository | https://github.com/abdfnx/botway |
| max_upload_size | |
| id | 580322 |
| size | 4,781 |
Rust client package for Botway
Cargo.toml[dependencies]
botway-rs = "0.2.2"
CLIcargo add botway-rs
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;
}
...