команде /START
@dp.message_handler(commands='start')
async def start(message: Message):
text = '123'
buttontext = InlineKeyboardMarkup().add(
InlineKeyboardButton(text=button, callback_data='step1')
)
await message.answer(agreeText, reply_markup=buttontext)
# Шаг 1
@dp.callback_query_handler(text='step1')
async def step1(query: CallbackQuery, state: FSMContext):
if условие:
await step2(query, state)
else:
await start(query)
async def step2...
else: await start(query.message)
Обсуждают сегодня