From 4a52f97a68b20c41a9c367c0e64c371575563136 Mon Sep 17 00:00:00 2001 From: birdi Date: Mon, 5 Aug 2019 13:17:47 +0300 Subject: [PATCH] Fix throttled docs --- aiogram/dispatcher/dispatcher.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aiogram/dispatcher/dispatcher.py b/aiogram/dispatcher/dispatcher.py index 61874642..404cc8e1 100644 --- a/aiogram/dispatcher/dispatcher.py +++ b/aiogram/dispatcher/dispatcher.py @@ -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