use crate::prelude::*; #[inline] async fn check_password( bot: &Throttle, msg: &Message, _: &DatabaseConnection, login: &str, ) -> crate::Result> { let is_valid = validate_field(login); if !is_valid { let msg = bot .send_message(msg.chat.id, "Invalid password. Try again") .await?; return Ok(Some(msg)); } Ok(None) } crate::simple_state_handler!( get_password, check_password, "Couldn't get the text of the message. Send the password again" );