👑️
Size: a a a
👑️
👑️
B
aioschedule
+ aiogram
👑️
👑️
B
👑️
B
И
И
@dp.callback_query_handler(text='start_func')
async def process_stating(query: types.CallbackQuery):
# Set state
await Form.name.set()
await bot.send_message(query.from_user.id, 'Привет, как тебя зовут?')
@dp.callback_query_handler(state=Form.name)
async def process_name(query: types.CallbackQuery, state: FSMContext):
async with state.proxy() as data:
data['name'] = query.from_user.id.text
await Form.next()
await bot.send_message(query.from_user.id, 'Введите свой логин')
И
B
И
И
И
callback_query_handler
ничего не происходитB
@dp.callback_query_handler(text='start_func')
async def process_stating(query: types.CallbackQuery):
# Set state
await Form.name.set()
await bot.send_message(query.from_user.id, 'Привет, как тебя зовут?')
@dp.callback_query_handler(state=Form.name)
async def process_name(query: types.CallbackQuery, state: FSMContext):
async with state.proxy() as data:
data['name'] = query.from_user.id.text
await Form.next()
await bot.send_message(query.from_user.id, 'Введите свой логин')
@dp.callback_query_handler(text='start_func')
async def process_stating(query: types.CallbackQuery):
# Set state
await Form.name.set()
await bot.send_message(query.from_user.id, 'Привет, как тебя зовут?')
@dp.message_handler(state=Form.name, content_types=types.ContentType.TEXT)
async def process_name(message: types.Message, state: FSMContext):
await state.update_data(name=message.text)
await Form.next()
await bot.send_message(query.from_user.id, 'Введите свой логин')
И
B
B
await message.answer( 'Введите свой логин')
И