mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-10 17:53:17 +00:00
remove unnecessary loop definitions
This commit is contained in:
parent
66849ec770
commit
1ea76cd902
12 changed files with 22 additions and 34 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue