Fixed
This commit is contained in:
@@ -23,42 +23,12 @@ async def reg_new_user_default_condition_settings(id):
|
||||
|
||||
|
||||
async def main_settings_message(id, message):
|
||||
|
||||
tg_id = id
|
||||
trigger = await rq.get_for_registration_trigger(tg_id)
|
||||
text = f""" <b>Условия запуска</b>
|
||||
|
||||
<b>- Режим торговли:</b> {trigger}
|
||||
<b>- Таймер: </b> установить таймер / удалить таймер
|
||||
"""
|
||||
await message.answer(text=text, parse_mode='html', reply_markup=inline_markup.condition_settings_markup)
|
||||
|
||||
|
||||
async def trigger_message(id, message, state: FSMContext):
|
||||
await state.set_state(condition_settings.trigger)
|
||||
text = '''
|
||||
<b>- Автоматический:</b> торговля будет происходить в рамках серии ставок.
|
||||
<b>- Ручной:</b> торговля будет происходить только в ручном режиме.
|
||||
<em>- Выберите тип триггера:</em>'''
|
||||
|
||||
await message.answer(text=text, parse_mode='html', reply_markup=inline_markup.trigger_markup)
|
||||
|
||||
|
||||
@condition_settings_router.callback_query(F.data == "clb_trigger_manual")
|
||||
async def trigger_manual_callback(callback: CallbackQuery, state: FSMContext):
|
||||
await state.set_state(condition_settings.trigger)
|
||||
await rq.update_trigger(tg_id=callback.from_user.id, trigger="Ручной")
|
||||
await main_settings_message(callback.from_user.id, callback.message)
|
||||
await callback.answer()
|
||||
|
||||
|
||||
@condition_settings_router.callback_query(F.data == "clb_trigger_auto")
|
||||
async def trigger_manual_callback(callback: CallbackQuery, state: FSMContext):
|
||||
await state.set_state(condition_settings.trigger)
|
||||
await rq.update_trigger(tg_id=callback.from_user.id, trigger="Автоматический")
|
||||
await main_settings_message(callback.from_user.id, callback.message)
|
||||
await callback.answer()
|
||||
|
||||
async def timer_message(id, message: Message, state: FSMContext):
|
||||
await state.set_state(condition_settings.timer)
|
||||
|
||||
@@ -140,4 +110,4 @@ async def ai_analytics_message(message, state):
|
||||
|
||||
Описание... '''
|
||||
|
||||
await message.answer(text=text, parse_mode='html', reply_markup=inline_markup.buttons_yes_no_markup)
|
||||
await message.answer(text=text, parse_mode='html', reply_markup=inline_markup.buttons_yes_no_markup)
|
||||
|
Reference in New Issue
Block a user