Don't use .send() in examples/simple_commands_bot

This commit is contained in:
Hirrolot 2021-05-20 21:37:53 +06:00
parent 9d243b50c8
commit c3bcdca549
2 changed files with 2 additions and 2 deletions

View file

@ -150,7 +150,7 @@ async fn answer(
command: Command, command: Command,
) -> Result<(), Box<dyn Error + Send + Sync>> { ) -> Result<(), Box<dyn Error + Send + Sync>> {
match command { match command {
Command::Help => cx.answer(Command::descriptions()).send().await?, Command::Help => cx.answer(Command::descriptions()).await?,
Command::Username(username) => { Command::Username(username) => {
cx.answer(format!("Your username is @{}.", username)).await? cx.answer(format!("Your username is @{}.", username)).await?
} }

View file

@ -18,7 +18,7 @@ async fn answer(
command: Command, command: Command,
) -> Result<(), Box<dyn Error + Send + Sync>> { ) -> Result<(), Box<dyn Error + Send + Sync>> {
match command { match command {
Command::Help => cx.answer(Command::descriptions()).send().await?, Command::Help => cx.answer(Command::descriptions()).await?,
Command::Username(username) => { Command::Username(username) => {
cx.answer(format!("Your username is @{}.", username)).await? cx.answer(format!("Your username is @{}.", username)).await?
} }