mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-25 08:02:06 +01:00
Fix a typo
This commit is contained in:
parent
332da2c3dd
commit
e0d0e22ea6
3 changed files with 5 additions and 5 deletions
|
@ -145,7 +145,7 @@ async fn answer(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_command(rx: DispatcherHandlerRx<Message>) {
|
async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||||
// Only iterate through commands in a proper format:
|
// Only iterate through commands in a proper format:
|
||||||
rx.commands::<Command>()
|
rx.commands::<Command>()
|
||||||
// Execute all incoming commands concurrently:
|
// Execute all incoming commands concurrently:
|
||||||
|
|
|
@ -30,7 +30,7 @@ async fn answer(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_command(rx: DispatcherHandlerRx<Message>) {
|
async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||||
// Only iterate through commands in a proper format:
|
// Only iterate through commands in a proper format:
|
||||||
rx.commands::<Command>()
|
rx.commands::<Command>()
|
||||||
// Execute all incoming commands concurrently:
|
// Execute all incoming commands concurrently:
|
||||||
|
@ -51,5 +51,5 @@ async fn run() {
|
||||||
|
|
||||||
let bot = Bot::from_env();
|
let bot = Bot::from_env();
|
||||||
|
|
||||||
Dispatcher::new(bot).messages_handler(handle_command).dispatch().await;
|
Dispatcher::new(bot).messages_handler(handle_commands).dispatch().await;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
//! Ok(())
|
//! Ok(())
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! async fn handle_command(rx: DispatcherHandlerRx<Message>) {
|
//! async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||||
//! // Only iterate through commands in a proper format:
|
//! // Only iterate through commands in a proper format:
|
||||||
//! rx.commands::<Command>()
|
//! rx.commands::<Command>()
|
||||||
//! // Execute all incoming commands concurrently:
|
//! // Execute all incoming commands concurrently:
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
//! # teloxide::enable_logging!();
|
//! # teloxide::enable_logging!();
|
||||||
//! # log::info!("Starting simple_commands_bot!");
|
//! # log::info!("Starting simple_commands_bot!");
|
||||||
//! # let bot = Bot::from_env();
|
//! # let bot = Bot::from_env();
|
||||||
//! # Dispatcher::new(bot).messages_handler(handle_command).dispatch().await;
|
//! # Dispatcher::new(bot).messages_handler(handle_commands).dispatch().await;
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
|
|
Loading…
Add table
Reference in a new issue