diff --git a/README.md b/README.md index 20a2b4eb..2f25ebc3 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ tokio = { version = "1.8", features = ["rt-multi-thread", "macros"] } This bot replies with a dice throw to each received message: -([Full](./examples/dices.rs)) +([Full](examples/dices.rs)) ```rust,no_run use teloxide::prelude2::*; @@ -119,7 +119,7 @@ Commands are strongly typed and defined declaratively, similar to how we define [structopt]: https://docs.rs/structopt/0.3.9/structopt/ [serde-json]: https://github.com/serde-rs/json -([Full](./examples/simple_commands.rs)) +([Full](examples/simple_commands.rs)) ```rust,no_run use teloxide::{prelude2::*, utils::command::BotCommand}; @@ -265,7 +265,7 @@ async fn handle_receive_age( bot: AutoSend, msg: Message, dialogue: MyDialogue, - (full_name,): (String,), + (full_name,): (String,), // Available from `State::ReceiveAge`. ) -> anyhow::Result<()> { match msg.text().map(|text| text.parse::()) { Some(Ok(age)) => { @@ -284,7 +284,7 @@ async fn handle_receive_location( bot: AutoSend, msg: Message, dialogue: MyDialogue, - (full_name, age): (String, u8), + (full_name, age): (String, u8), // Available from `State::ReceiveLocation`. ) -> anyhow::Result<()> { match msg.text() { Some(location) => { @@ -307,7 +307,7 @@ async fn handle_receive_location( -[More examples >>](./examples) +[More examples >>](examples/) ## FAQ @@ -329,7 +329,7 @@ A: No, only the bots API. **Q: Can I use webhooks?** -A: teloxide doesn't provide special API for working with webhooks due to their nature with lots of subtle settings. Instead, you should setup your webhook by yourself, as shown in [`examples/ngrok_ping_pong_bot`](./examples/ngrok_ping_pong_bot/src/main.rs) and [`examples/heroku_ping_pong_bot`](./examples/heroku_ping_pong_bot/src/main.rs). +A: teloxide doesn't provide special API for working with webhooks due to their nature with lots of subtle settings. Instead, you should setup your webhook by yourself, as shown in [`examples/ngrok_ping_pong_bot`](examples/ngrok_ping_pong_bot/src/main.rs) and [`examples/heroku_ping_pong_bot`](examples/heroku_ping_pong_bot/src/main.rs). Associated links: - [Marvin's Marvellous Guide to All Things Webhook](https://core.telegram.org/bots/webhooks) diff --git a/examples/dialogue.rs b/examples/dialogue.rs index 0ddb9c53..8bb4b294 100644 --- a/examples/dialogue.rs +++ b/examples/dialogue.rs @@ -91,7 +91,7 @@ async fn handle_receive_age( bot: AutoSend, msg: Message, dialogue: MyDialogue, - (full_name,): (String,), + (full_name,): (String,), // Available from `State::ReceiveAge`. ) -> anyhow::Result<()> { match msg.text().map(|text| text.parse::()) { Some(Ok(age)) => { @@ -110,7 +110,7 @@ async fn handle_receive_location( bot: AutoSend, msg: Message, dialogue: MyDialogue, - (full_name, age): (String, u8), + (full_name, age): (String, u8), // Available from `State::ReceiveLocation`. ) -> anyhow::Result<()> { match msg.text() { Some(location) => { diff --git a/src/dispatching2/dialogue/mod.rs b/src/dispatching2/dialogue/mod.rs index 6080d59c..7f2c1e08 100644 --- a/src/dispatching2/dialogue/mod.rs +++ b/src/dispatching2/dialogue/mod.rs @@ -38,7 +38,7 @@ //! bot: AutoSend, //! msg: Message, //! dialogue: MyDialogue, -//! (full_name,): (String,), +//! (full_name,): (String,), // Available from `State::ReceiveAge`. //! ) -> anyhow::Result<()> { //! match msg.text() { //! Some(number) => match number.parse::() { @@ -70,7 +70,7 @@ //! bot: AutoSend, //! msg: Message, //! dialogue: MyDialogue, -//! (full_name, age): (String, u8), +//! (full_name, age): (String, u8), // Available from `State::ReceiveLocation`. //! ) -> anyhow::Result<()> { //! match msg.text() { //! Some(location) => {