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; //! } //! ``` //!