mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 01:54:53 +00:00
Fix throttled docs
This commit is contained in:
parent
4d00b7c502
commit
4a52f97a68
1 changed files with 4 additions and 2 deletions
|
|
@ -1041,11 +1041,13 @@ class Dispatcher(DataMixin, ContextInstanceMixin):
|
|||
Example:
|
||||
|
||||
.. code-block:: python3
|
||||
|
||||
async def handler_throttled(message: types.Message, **kwargs):
|
||||
message.answer("Throttled!")
|
||||
await message.answer("Throttled!")
|
||||
|
||||
@dp.throttled(handler_throttled)
|
||||
async def some_handler(message: types.Message )
|
||||
async def some_handler(message: types.Message):
|
||||
await message.answer("Didn't throttled!")
|
||||
|
||||
:param on_throttled: the callable object that should be either a function or return a coroutine
|
||||
:param key: key in storage
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue