mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Add bot registration limit
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user