fix args handlers
This commit is contained in:
parent
a487f452d9
commit
6f44c533d4
@ -23,7 +23,6 @@ async def mainstart(
|
||||
async def example_callback(
|
||||
message: aiogram.types.CallbackQuery,
|
||||
state: FSMContext,
|
||||
command: Command,
|
||||
bot: Bot,
|
||||
):
|
||||
await state.clear()
|
||||
@ -33,12 +32,12 @@ async def example_callback(
|
||||
async def example_callback_factory(
|
||||
message: aiogram.types.CallbackQuery,
|
||||
state: FSMContext,
|
||||
command: Command,
|
||||
bot: Bot,
|
||||
callback_data: factory.ExampleFactory = None,
|
||||
):
|
||||
await state.clear()
|
||||
await state.set_state(states.ExampleState.input_user)
|
||||
await message.answer()
|
||||
return await bot.send_message(
|
||||
chat_id=message.message.chat.id,
|
||||
text=f'CallbackData: {callback_data.example} | Set state, wait input...'
|
||||
@ -48,10 +47,9 @@ async def example_callback_factory(
|
||||
async def example_state(
|
||||
message: aiogram.types.Message,
|
||||
state: FSMContext,
|
||||
command: Command,
|
||||
bot: Bot,
|
||||
):
|
||||
await state.clear()
|
||||
return await message.answer(
|
||||
text=f"hello! Your text: \n\n{message.text}"
|
||||
text=f"hello! Your text: \n\n{message.text}\n\nState Off!"
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user