mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge branch 'dev-2.x' into add-new-ways-throttle
# Conflicts: # examples/throtling_example.py
This commit is contained in:
commit
ed0d4796e7
63 changed files with 1567 additions and 939 deletions
|
|
@ -12,6 +12,7 @@ from aiogram.dispatcher import Dispatcher
|
|||
from aiogram.utils.exceptions import Throttled
|
||||
from aiogram.utils.executor import start_polling
|
||||
|
||||
|
||||
API_TOKEN = 'BOT_TOKEN_HERE'
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
|
@ -19,7 +20,7 @@ logging.basicConfig(level=logging.INFO)
|
|||
bot = Bot(token=API_TOKEN)
|
||||
|
||||
# Throttling manager does not work without Leaky Bucket.
|
||||
# Then need to use storages. For example use simple in-memory storage.
|
||||
# You need to use a storage. For example use simple in-memory storage.
|
||||
storage = MemoryStorage()
|
||||
dp = Dispatcher(bot, storage=storage)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue