def setup(): from app.models import db from app import middlewares from app import filters db.setup(runner) middlewares.setup(dp) filters.setup(dp) import app.handlers
def setup(): from app import middlewares from app.utils import executor middlewares.setup(dp) filters.setup(dp) executor.setup() logger.info("Register handlers...") # noinspection PyUnresolvedReferences import app.handlers
def setup(): from app import filters from app import middlewares from app.utils import executor logger.debug(f"As application dir using: {app_dir}") middlewares.setup(dp) filters.setup(dp) executor.setup() logger.info("Configure handlers...") # noinspection PyUnresolvedReferences import app.handlers
async def on_startup(dp: Dispatcher): filters.setup(dp) handlers.setup(dp) middlewares.setup(dp)