I'm writing a bot on aiogram and have a problem. The user has to enter the number twice to get the next message from the bot. Here is the example:
Bot, [24.06.2023 20:54] Write email
Рамиль, [24.06.2023 20:54] @
Рамиль, [24.06.2023 20:54] @
Bot, [24.06.2023 20:54] Choose action:
Here is the code
@dp.message_handler(state=Form.email)
async def process_phone(message: types.Message, state: FSMContext):
email=message.text
if email.startswith("@"):
await Form.next()
else:
await message.answer("Write email pls")
What is wrong?
i tried this but it didn't help
@dp.message_handler(state=Form.email)
async def process_phone(message: types.Message, state: FSMContext):
email=message.text
if email.startswith("@"):
await message.answer("Write email plsss")
else:
await Form.next()