Code cleanup

This commit is contained in:
2024-05-11 17:25:15 +03:00
parent 913d90f077
commit aa3c2ae313
20 changed files with 45 additions and 43 deletions

View File

@@ -1,7 +1,10 @@
use crate::prelude::*;
/// Deletes the message ignoring the errors
/// Deletes the message without returining errors
#[inline]
pub async fn delete_message(bot: Throttle<Bot>, msg: Message) {
let _ = bot.delete_message(msg.chat.id, msg.id).await;
let ids = MessageIds::from(&msg);
if let Err(err) = ids.delete(&bot).await {
handle_error(err);
}
}