From 18c49d42d4d95284be91c4227e3b73f1a08ffa90 Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Mon, 6 May 2024 22:43:56 +0200 Subject: [PATCH] Fix --- src/core/file_utils.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/file_utils.rs b/src/core/file_utils.rs index fe451dc..53658be 100644 --- a/src/core/file_utils.rs +++ b/src/core/file_utils.rs @@ -72,7 +72,13 @@ pub async fn download_file(chat_id: i64, message_id: i32) -> Option v.file.id.clone(), + None => { + log::error!("Document not found!"); + return None; + } + }; let path = match bot.get_file(file_id.clone()).await { Ok(v) => v.path, Err(err) => {