From e0d0e22ea67e161ec472e2754b68c62db1f8c3a7 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Wed, 19 Feb 2020 21:19:22 +0600 Subject: [PATCH] Fix a typo --- README.md | 2 +- examples/simple_commands_bot/src/main.rs | 4 ++-- src/lib.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0c4b27b6..1cb62b3b 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ async fn answer( Ok(()) } -async fn handle_command(rx: DispatcherHandlerRx) { +async fn handle_commands(rx: DispatcherHandlerRx) { // Only iterate through commands in a proper format: rx.commands::() // Execute all incoming commands concurrently: diff --git a/examples/simple_commands_bot/src/main.rs b/examples/simple_commands_bot/src/main.rs index e1079c64..535b3f92 100644 --- a/examples/simple_commands_bot/src/main.rs +++ b/examples/simple_commands_bot/src/main.rs @@ -30,7 +30,7 @@ async fn answer( Ok(()) } -async fn handle_command(rx: DispatcherHandlerRx) { +async fn handle_commands(rx: DispatcherHandlerRx) { // Only iterate through commands in a proper format: rx.commands::() // Execute all incoming commands concurrently: @@ -51,5 +51,5 @@ async fn run() { let bot = Bot::from_env(); - Dispatcher::new(bot).messages_handler(handle_command).dispatch().await; + Dispatcher::new(bot).messages_handler(handle_commands).dispatch().await; } diff --git a/src/lib.rs b/src/lib.rs index be319ef6..5910573e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -131,7 +131,7 @@ //! Ok(()) //! } //! -//! async fn handle_command(rx: DispatcherHandlerRx) { +//! async fn handle_commands(rx: DispatcherHandlerRx) { //! // Only iterate through commands in a proper format: //! rx.commands::() //! // Execute all incoming commands concurrently: @@ -147,7 +147,7 @@ //! # teloxide::enable_logging!(); //! # log::info!("Starting simple_commands_bot!"); //! # let bot = Bot::from_env(); -//! # Dispatcher::new(bot).messages_handler(handle_command).dispatch().await; +//! # Dispatcher::new(bot).messages_handler(handle_commands).dispatch().await; //! } //! ``` //!