From d4a7393b511fc5ff973ccd59428227c39b96350c Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Sat, 25 Jul 2020 19:40:58 +0600 Subject: [PATCH] Update README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 43a2604b..6389447f 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,11 @@ async fn main() { ### Commands -Commands are defined similar to how we define CLI using [structopt] and JSON structures in [serde-json]. The following bot accepts either `/username YourUsername`, `/usernameandage YourUsername YourAge` and shows the usage guide on `/help`: +Commands are strongly typed and defined declaratively, similar to how we define CLI using [structopt] and JSON structures in [serde-json]. The following bot accepts these commands: + + - `/username ` + - `/usernameandage ` + - `/help` [structopt]: https://docs.rs/structopt/0.3.9/structopt/ [serde-json]: https://github.com/serde-rs/json @@ -303,6 +307,8 @@ pub async fn receive_gandalf_alternative_name( } ``` +And, finally, the `main` function looks like this: + ([dialogue_bot/src/main.rs](https://github.com/teloxide/teloxide/blob/master/examples/dialogue_bot/src/main.rs)) ```rust // Imports are omitted...