fixed the method of getting the timer value.
This commit is contained in:
@@ -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:
|
if timer_minutes and timer_minutes > 0:
|
||||||
await message.answer(f"Торговля будет работать по таймеру: {timer_minutes} мин.")
|
await message.answer(f"Торговля будет работать по таймеру: {timer_minutes} мин.")
|
||||||
asyncio.create_task(trading_cycle(tg_id, message))
|
asyncio.create_task(trading_cycle(tg_id, message))
|
||||||
|
Reference in New Issue
Block a user