mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 07:25:36 +01:00
Refactor send_donation_notification error handling
This commit is contained in:
@@ -91,7 +91,10 @@ async fn send_cached_message(
|
|||||||
bot.delete_message(message.chat.id, message.id).await?;
|
bot.delete_message(message.chat.id, message.id).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_donation_notification(bot.clone(), message).await?;
|
match send_donation_notification(bot.clone(), message).await {
|
||||||
|
Ok(_) => (),
|
||||||
|
Err(err) => log::error!("{:?}", err),
|
||||||
|
}
|
||||||
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
@@ -126,7 +129,10 @@ async fn _send_downloaded_file(
|
|||||||
.send()
|
.send()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
send_donation_notification(bot, message.clone()).await?;
|
match send_donation_notification(bot, message.clone()).await {
|
||||||
|
Ok(_) => (),
|
||||||
|
Err(err) => log::error!("{:?}", err),
|
||||||
|
};
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user