Update the docs of dialogue/mod.rs

This commit is contained in:
Hirrolot 2022-02-05 00:26:40 +06:00
parent 539c53abde
commit aade493391

View file

@ -40,18 +40,13 @@
//! dialogue: MyDialogue, //! dialogue: MyDialogue,
//! (full_name,): (String,), // Available from `State::ReceiveAge`. //! (full_name,): (String,), // Available from `State::ReceiveAge`.
//! ) -> anyhow::Result<()> { //! ) -> anyhow::Result<()> {
//! match msg.text() { //! match msg.text().map(|text| text.parse::<u8>()) {
//! Some(number) => match number.parse::<u8>() { //! Some(Ok(age)) => {
//! Ok(age) => { //! bot.send_message(msg.chat.id, "What's your location?").await?;
//! bot.send_message(msg.chat.id, "What's your location?").await?; //! dialogue.update(State::ReceiveLocation { full_name, age }).await?;
//! dialogue.update(State::ReceiveLocation { full_name, age }).await?; //! }
//! } //! _ => {
//! _ => { //! bot.send_message(msg.chat.id, "Send me a number.").await?;
//! bot.send_message(msg.chat.id, "Send me a number.").await?;
//! }
//! },
//! None => {
//! bot.send_message(msg.chat.id, "Send me a text message.").await?;
//! } //! }
//! } //! }
//! //!