From f895c19b14cc8a330abfd28e8866d1c00bd918be Mon Sep 17 00:00:00 2001 From: algizn97 Date: Fri, 22 Aug 2025 16:57:59 +0500 Subject: [PATCH] fixed the method of getting the timer value. --- app/services/Bybit/functions/functions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/services/Bybit/functions/functions.py b/app/services/Bybit/functions/functions.py index ef87d6e..b5c315c 100644 --- a/app/services/Bybit/functions/functions.py +++ b/app/services/Bybit/functions/functions.py @@ -257,7 +257,9 @@ async def start_trading_process(callback: CallbackQuery, state: FSMContext): # Проверяем таймер и информируем пользователя - timer_minutes = await rq.get_user_timer(tg_id) + + timer_data = await rq.get_user_timer(tg_id) + timer_minutes = timer_data.get('timer') if isinstance(timer_data, dict) else timer_data if timer_minutes and timer_minutes > 0: await message.answer(f"Торговля будет работать по таймеру: {timer_minutes} мин.") asyncio.create_task(trading_cycle(tg_id, message))