Answer the question
In order to leave comments, you need to log in
Can anyone figure out how to solve this?
can someone help me understand, I click on the send number button, and await message.reply("Your application has been accepted and will be reviewed soon ✅", reply_markup=kb.menu_markup) is not displayed
Из результата третьего вопроса не выводится получение номера и формировка заявки
<code lang="python">
# Результат третьего общего вопроса
@dp.message_handler(state=Btns.Q3)
async def third_question(message: types.Message, state: FSMContext):
global area
area = message.text
await message.answer("Ваш ответ: "+area)
await message.answer("Предоставьте пожалуйста ваш номер телефона, менеджер свяжется с вами на счет заявки", reply_markup=kb.markup_request)
await state.finish()
await Btns.Q4.set()
# Получение номера и формировка заявки
@dp.message_handler(state=Btns.Q4)
async def fourth_question(message: types.Message, state: FSMContext):
global phone_num
not message.contact is None
phone_num = message.contact.phone_number
await message.answer("Ваша заявка принята и вскоре будет рассмотрена ✅", reply_markup=kb.menu_markup)
array = {'values': }
range_ = A1Range.create_a1range_from_list(
'Лист1', 2, 1, array['values']).format()
response = service.update(spreadsheetId=SAMPLE_SPREADSHEET_ID,
range=range_,
valueInputOption='RAW',
body=array).execute()
await message.answer("Вы отправили неккоректный номер телефона, попробуйте еще раз", reply_markup=kb.markup_request)
await state.finish()
await Btns.Q4.set()
# RUN
if __name__ == '__main__':
executor.start_polling(dp)
</code>
Answer the question
In order to leave comments, you need to log in
I do not work with aiogram, but most likely the problem is that they gave the command to end the FSM.
Replace
await state.finish()
await Btns.Q4.set()
await Btns.next()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question