mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Remove stupid comments
This commit is contained in:
parent
67a31a6437
commit
0db3116939
3 changed files with 0 additions and 8 deletions
|
@ -151,9 +151,7 @@ async fn answer(
|
|||
}
|
||||
|
||||
async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||
// Only iterate through commands in a proper format:
|
||||
rx.commands::<Command, &str>(panic!("Insert here your bot's name"))
|
||||
// Execute all incoming commands concurrently:
|
||||
.for_each_concurrent(None, |(cx, command, _)| async move {
|
||||
answer(cx, command).await.log_on_error().await;
|
||||
})
|
||||
|
|
|
@ -174,13 +174,9 @@ async fn action(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
// Handle all messages.
|
||||
async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||
// Only iterate through messages from groups:
|
||||
rx.filter(|cx| future::ready(cx.update.chat.is_group()))
|
||||
// Only iterate through commands in a proper format:
|
||||
.commands::<Command, &str>(panic!("Insert here your bot's name"))
|
||||
// Execute all incoming commands concurrently:
|
||||
.for_each_concurrent(None, |(cx, command, args)| async move {
|
||||
action(cx, command, &args).await.log_on_error().await;
|
||||
})
|
||||
|
|
|
@ -31,9 +31,7 @@ async fn answer(
|
|||
}
|
||||
|
||||
async fn handle_commands(rx: DispatcherHandlerRx<Message>) {
|
||||
// Only iterate through commands in a proper format:
|
||||
rx.commands::<Command, &str>(panic!("Insert here your bot's name"))
|
||||
// Execute all incoming commands concurrently:
|
||||
.for_each_concurrent(None, |(cx, command, _)| async move {
|
||||
answer(cx, command).await.log_on_error().await;
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue