From 8ec622c427a7a0b2025ee50180db978f861db1a0 Mon Sep 17 00:00:00 2001 From: Olly Hearn Date: Wed, 28 Jan 2026 14:56:43 +0300 Subject: [PATCH] feat: handlers --- handlers/private_handlers.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/handlers/private_handlers.py b/handlers/private_handlers.py index 8c03ab0..cf3a771 100644 --- a/handlers/private_handlers.py +++ b/handlers/private_handlers.py @@ -75,6 +75,22 @@ def register_private_handlers(bot: telebot.TeleBot) -> None: finally: db.close() + @bot.message_handler(commands=['help'], chat_types=['private']) + def handle_help(message: telebot.types.Message) -> None: + """Handle /help command in private chat.""" + help_text = ( + "📚 Команды бота:\n\n" + "/start - Поделиться днем рождения и выбрать тему предпочтений\n" + "/update - Обновить свой день рождения или тему предпочтений\n" + "/help - Показать это сообщение\n\n" + "В группах доступны команды:\n" + "/stats - Статистика по чату\n" + "/week - Дни рождения на 7 дней\n" + "/month - Дни рождения на 31 день\n\n" + "from olly & cursor with <3" + ) + bot.send_message(message.chat.id, help_text) + @bot.message_handler(func=lambda m: m.chat.type == 'private' and m.from_user and m.from_user.id in user_states and m.text) def handle_birthday_input(message: telebot.types.Message) -> None: """Handle birthday input from user."""