Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Commit

Permalink
Update botway-rs package README
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx committed Jun 28, 2022
1 parent 0cc2eb9 commit 77a8d03
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/botway-rs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
</p>
</div>

## Installation

```toml
[dependencies]
botway-rs = "0.2"
Expand All @@ -19,16 +21,18 @@ botway-rs = "0.2"
> after creating a new rust botway project, you need to use your tokens to connect with your bot.
```rust
use futures::StreamExt;
use telegram_bot::*;

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

#[tokio::main]
async fn main() -> Result<(), Error> {
let api = Api::new(get("token"));
let mut stream = api.stream();
...
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;
}
...
```

0 comments on commit 77a8d03

Please sign in to comment.