Esempio n. 1
0
async def on_startup(dispatcher: Dispatcher):
    handlers.setup(dispatcher)
    middlewares.setup(dispatcher)

    await utils.setup_bot_commands(dispatcher)
    await utils.on_startup_notify(dispatcher)
    logger.warning('\033[1;34m Bot is successfully configured \033[0m')
Esempio n. 2
0
async def startup(dispatcher: Dispatcher):
    logger.setup("DEBUG" if config.DEBUG else "INFO")
    await models.setup(config.DB_URI)
    scheduler.setup()

    middlewares.setup(dispatcher, debug=config.DEBUG)
    handlers.setup(dispatcher)
Esempio n. 3
0
def setup():
    from app.utils import executor
    from app import middlewares
    middlewares.setup(dp)
    logger.info("Configure handlers...")
    # noinspection PyUnresolvedReferences
    import app.handlers
    executor.setup()
Esempio n. 4
0
def setup():
    from app import middlewares
    from app.utils import executor

    middlewares.setup(dp)
    executor.setup()

    logger.info("Configure handlers...")
    import app.handlers
Esempio n. 5
0
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
Esempio n. 6
0
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
Esempio n. 7
0
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
Esempio n. 8
0
async def on_startup(dp: Dispatcher):
    filters.setup(dp)
    handlers.setup(dp)
    middlewares.setup(dp)