feat: handlers

This commit is contained in:
2026-01-28 14:56:43 +03:00
parent a16a979c63
commit 8ec622c427

View File

@ -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."""