fix: (registration) fix handler for "Продолжить" button, now working without additional requirements
All checks were successful
Build and Push Docker Images / build (push) Successful in 1m19s

Signed-off-by: UdoChudo <stream@udochudo.ru>
This commit is contained in:
Udo Chudo 2025-06-24 10:32:12 +05:00
parent 295c1f68e0
commit a1c36de342

View File

@ -1,15 +1,16 @@
# app/bot/handlers/start.py # app/bot/handlers/start.py
from telebot.types import Message
from telebot import logger from telebot import logger
from app.bot.keyboards.main_menu import get_main_menu from telebot.types import Message
from app.bot.constants import UserStates from app.bot.constants import UserStates
from app.bot.keyboards.main_menu import get_main_menu
from app.bot.states import UserStateManager from app.bot.states import UserStateManager
from app.bot.utils.auth import check_registration from app.bot.utils.auth import check_registration
def register_handlers(bot,app, state_manager: UserStateManager): def register_handlers(bot,app, state_manager: UserStateManager):
@bot.message_handler(commands=['start']) @bot.message_handler(commands=['start'])
@bot.message_handler(func=lambda msg: msg.text == "Продолжить" and state_manager.get_state(msg.chat.id) == UserStates.REGISTRATION) @bot.message_handler(func=lambda msg: msg.text == "Продолжить")
def start_handler(message: Message): def start_handler(message: Message):
chat_id = message.chat.id chat_id = message.chat.id
username = f"{message.from_user.username}" if message.from_user.username else "N/A" username = f"{message.from_user.username}" if message.from_user.username else "N/A"