mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-22 06:45:37 +01:00
Don't use .send()
in examples/simple_commands_bot
This commit is contained in:
parent
9d243b50c8
commit
c3bcdca549
2 changed files with 2 additions and 2 deletions
|
@ -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?
|
||||||
}
|
}
|
||||||
|
|
|
@ -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?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue