diff --git a/src/main.rs b/src/main.rs index 075bf48..b789d48 100644 --- a/src/main.rs +++ b/src/main.rs @@ -227,7 +227,7 @@ async fn user_command_handler( let mut db2 = db.clone(); answer_message( &bot, - &msg, + msg.chat.id.0, &mut db, "start", Some(make_start_buttons(&mut db2).await), @@ -244,7 +244,7 @@ async fn user_command_handler( async fn answer_message>( bot: &Bot, - msg: &Message, + chat_id: i64, db: &mut DB, literal: &str, keyboard: Option, @@ -254,7 +254,7 @@ async fn answer_message>( .await .unwrap() .unwrap_or("Please, set content of this message".into()); - let msg = bot.send_message(msg.chat.id, text); + let msg = bot.send_message(ChatId(chat_id), text); let msg = match keyboard { Some(kbd) => msg.reply_markup(kbd), None => msg,