mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Update the docs of dialogue/mod.rs
This commit is contained in:
parent
539c53abde
commit
aade493391
1 changed files with 7 additions and 12 deletions
|
@ -40,18 +40,13 @@
|
|||
//! dialogue: MyDialogue,
|
||||
//! (full_name,): (String,), // Available from `State::ReceiveAge`.
|
||||
//! ) -> anyhow::Result<()> {
|
||||
//! match msg.text() {
|
||||
//! Some(number) => match number.parse::<u8>() {
|
||||
//! Ok(age) => {
|
||||
//! bot.send_message(msg.chat.id, "What's your location?").await?;
|
||||
//! dialogue.update(State::ReceiveLocation { full_name, age }).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?;
|
||||
//! match msg.text().map(|text| text.parse::<u8>()) {
|
||||
//! Some(Ok(age)) => {
|
||||
//! bot.send_message(msg.chat.id, "What's your location?").await?;
|
||||
//! dialogue.update(State::ReceiveLocation { full_name, age }).await?;
|
||||
//! }
|
||||
//! _ => {
|
||||
//! bot.send_message(msg.chat.id, "Send me a number.").await?;
|
||||
//! }
|
||||
//! }
|
||||
//!
|
||||
|
|
Loading…
Reference in a new issue