Remove stupid comments

This commit is contained in:
Temirkhan Myrzamadi 2020-06-01 18:09:49 +06:00
parent 67a31a6437
commit 0db3116939
3 changed files with 0 additions and 8 deletions

View file

@ -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;
})

View file

@ -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;
})

View file

@ -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;
})