Switched to teloxide 0.13

This commit is contained in:
2024-08-17 12:48:50 +03:00
parent 14b858808d
commit 374a9d91c7
29 changed files with 163 additions and 108 deletions

View File

@@ -3,7 +3,7 @@ use teloxide::{dispatching::DpHandlerDescription, dptree::Handler};
#[allow(clippy::needless_pass_by_value)]
fn has_no_user_info(msg: Message) -> bool {
msg.from().is_none()
msg.from.is_none()
}
async fn notify_about_no_user_info(

View File

@@ -14,7 +14,7 @@ type DynError = Arc<dyn std::error::Error + Send + Sync>;
/// Returns None if account exists, Some(None) if there's an account and Some(Some(DynError)) if an error occures.
/// The String represents the error that occured
async fn master_pass_exists(update: Update, db: Pool) -> Option<Option<DynError>> {
let user_id = match update.user() {
let user_id = match update.from() {
Some(user) => user.id.0,
None => return Some(Some(Arc::new(NoUserInfo))),
};