- Implemented the initial version of the web interface. refactor: Begin Telegram bot refactoring - Started restructuring the bot’s code for better maintainability. chore: Migrate to Flask project structure - Reorganized the application to follow Flask's project structure. cleanup: Extensive code cleanup - Removed redundant code and improved readability. Signed-off-by: UdoChudo <stream@udochudo.ru>
21 lines
1.1 KiB
Python
21 lines
1.1 KiB
Python
from telebot.types import Message
|
||
from app.bot.config import SUPPORT_EMAIL
|
||
|
||
|
||
def register_handlers(bot):
|
||
@bot.message_handler(func=lambda msg: msg.text == "Регистрация")
|
||
def handle_registration(message: Message):
|
||
chat_id = message.chat.id
|
||
username = message.from_user.username
|
||
if username:
|
||
username = f"@{username}"
|
||
else:
|
||
username = "N/A"
|
||
text = (
|
||
f'Для продолжения регистрации необходимо отправить с корпоративного почтового адреса "РТ МИС" письмо на адрес {SUPPORT_EMAIL}\n'
|
||
f'В теме письма указать "<b>Подтверждение регистрации в телеграм-боте TeleZab</b>".\n'
|
||
f'В теле письма указать:\n'
|
||
f'1. <b>ФИО</b>\n'
|
||
f'2. <b>Ваш Chat ID</b>: {chat_id}\n'
|
||
f'3. <b>Ваше имя пользователя</b>: {username}')
|
||
bot.send_message(chat_id, text, parse_mode="HTML") |