Add bot registration limit

This commit is contained in:
2024-01-07 22:18:58 +01:00
parent fc8a7d4d89
commit e3038ca6c5
3 changed files with 33 additions and 12 deletions

View File

@@ -22,8 +22,9 @@ pub async fn message_handler(
let message_text = match result {
register::RegisterStatus::Success { ref username } => format_registered_message(username),
register::RegisterStatus::WrongToken => strings::ERROR_MESSAGE.to_string(),
register::RegisterStatus::RegisterFail => strings::ALREADY_REGISTERED.to_string(),
register::RegisterStatus::LimitExtended => strings::LIMIT_EXTENDED_MESSAGE.to_string(),
register::RegisterStatus::WrongToken => strings::ERROR_MESSAGE.to_string(),
};
bot.send_message(message.chat.id, message_text)