mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
Bump
This commit is contained in:
parent
952fa53213
commit
4a0474f329
1 changed files with 1 additions and 1 deletions
|
|
@ -150,7 +150,7 @@ Usage:
|
||||||
|
|
||||||
@dp.message_handler(commands=['click'])
|
@dp.message_handler(commands=['click'])
|
||||||
async def cmd_start(message: types.Message, state: FSMContext):
|
async def cmd_start(message: types.Message, state: FSMContext):
|
||||||
async with state.proxy() as proxy: # proxy: FSMContextProxy
|
async with state.proxy() as proxy: # proxy = FSMContextProxy(state); await proxy.load()
|
||||||
proxy.setdefault('counter', 0)
|
proxy.setdefault('counter', 0)
|
||||||
proxy['counter'] += 1
|
proxy['counter'] += 1
|
||||||
return await message.reply(f"Counter: {proxy['counter']}")
|
return await message.reply(f"Counter: {proxy['counter']}")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue