mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
examples/simple_commands.rs
=> examples/command.rs
This commit is contained in:
parent
035b3c3bc8
commit
5ecfd3d810
3 changed files with 4 additions and 4 deletions
|
@ -121,7 +121,7 @@ Commands are strongly typed and defined declaratively, similar to how we define
|
||||||
[structopt]: https://docs.rs/structopt/0.3.9/structopt/
|
[structopt]: https://docs.rs/structopt/0.3.9/structopt/
|
||||||
[serde-json]: https://github.com/serde-rs/json
|
[serde-json]: https://github.com/serde-rs/json
|
||||||
|
|
||||||
([Full](examples/simple_commands.rs))
|
([Full](examples/command.rs))
|
||||||
|
|
||||||
```rust,no_run
|
```rust,no_run
|
||||||
use teloxide::{prelude::*, utils::command::BotCommands};
|
use teloxide::{prelude::*, utils::command::BotCommands};
|
||||||
|
@ -131,7 +131,7 @@ use std::error::Error;
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
pretty_env_logger::init();
|
pretty_env_logger::init();
|
||||||
log::info!("Starting simple_commands_bot...");
|
log::info!("Starting command bot...");
|
||||||
|
|
||||||
let bot = Bot::from_env().auto_send();
|
let bot = Bot::from_env().auto_send();
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ async fn answer(
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<kbd>
|
<kbd>
|
||||||
<img src=../../raw/master/media/simple-commands.gif />
|
<img src=../../raw/master/media/command.gif />
|
||||||
</kbd>
|
</kbd>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::error::Error;
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
pretty_env_logger::init();
|
pretty_env_logger::init();
|
||||||
log::info!("Starting simple_commands_bot...");
|
log::info!("Starting command bot...");
|
||||||
|
|
||||||
let bot = Bot::from_env().auto_send();
|
let bot = Bot::from_env().auto_send();
|
||||||
|
|
Before Width: | Height: | Size: 57 MiB After Width: | Height: | Size: 57 MiB |
Loading…
Reference in a new issue