mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +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(())
|
||||
}
|
||||
|
||||
async fn handle_command(rx: DispatcherHandlerRx<Message>) {
|
||||
async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||
// Only iterate through commands in a proper format:
|
||||
rx.commands::<Command>()
|
||||
// Execute all incoming commands concurrently:
|
||||
|
|
|
@ -30,7 +30,7 @@ async fn answer(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
async fn handle_command(rx: DispatcherHandlerRx<Message>) {
|
||||
async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||
// Only iterate through commands in a proper format:
|
||||
rx.commands::<Command>()
|
||||
// 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;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
//! Ok(())
|
||||
//! }
|
||||
//!
|
||||
//! async fn handle_command(rx: DispatcherHandlerRx<Message>) {
|
||||
//! async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||
//! // Only iterate through commands in a proper format:
|
||||
//! rx.commands::<Command>()
|
||||
//! // 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;
|
||||
//! }
|
||||
//! ```
|
||||
//!
|
||||
|
|
Loading…
Reference in a new issue