remove unnecessary loop definitions

This commit is contained in:
SetazeR 2019-07-15 14:00:38 +07:00
parent 66849ec770
commit 1ea76cd902
12 changed files with 22 additions and 34 deletions

View file

@ -9,12 +9,10 @@ from aiogram.utils.exceptions import Throttled
TOKEN = 'BOT TOKEN HERE'
loop = asyncio.get_event_loop()
# In this example Redis storage is used
storage = RedisStorage2(db=5)
bot = Bot(token=TOKEN, loop=loop)
bot = Bot(token=TOKEN)
dp = Dispatcher(bot, storage=storage)
@ -119,4 +117,4 @@ if __name__ == '__main__':
dp.middleware.setup(ThrottlingMiddleware())
# Start long-polling
executor.start_polling(dp, loop=loop)
executor.start_polling(dp)