No longer logging the error in the delete_message callback
This commit is contained in:
parent
f74d34f188
commit
9720fec16a
@ -4,12 +4,10 @@ use teloxide::{adaptors::Throttle, dispatching::DpHandlerDescription, prelude::*
|
||||
/// Deletes the message from the callback
|
||||
async fn run(bot: Throttle<Bot>, q: CallbackQuery) -> crate::Result<()> {
|
||||
if let Some(msg) = q.message {
|
||||
if let Err(err) = bot.delete_message(msg.chat.id, msg.id).await {
|
||||
let _ = bot
|
||||
.send_message(msg.chat.id, "Error deleting the message")
|
||||
if bot.delete_message(msg.chat.id, msg.id).await.is_err() {
|
||||
bot.send_message(msg.chat.id, "Error deleting the message")
|
||||
.reply_markup(deletion_markup())
|
||||
.await;
|
||||
return Err(err.into());
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user