24 lines
459 B
Python
24 lines
459 B
Python
from loader import bot, storage
|
|
|
|
|
|
async def on_startup(dp):
|
|
import filters
|
|
import middlewares
|
|
filters.setup(dp)
|
|
middlewares.setup(dp)
|
|
|
|
from utils.notify_admins import on_startup_notify
|
|
await on_startup_notify(dp)
|
|
|
|
|
|
async def on_shutdown(dp):
|
|
await bot.close()
|
|
await storage.close()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
from aiogram import executor
|
|
from handlers import dp
|
|
|
|
executor.start_polling(dp, on_startup=on_startup)
|