Merge branch 'dev-2.x' into add-new-ways-throttle

# Conflicts:
#	examples/throtling_example.py
This commit is contained in:
birdi 2019-08-15 17:06:10 +03:00
commit ed0d4796e7
63 changed files with 1567 additions and 939 deletions

View file

@ -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)