diff --git a/__init__.py b/__init__.py index 2198b8c..5e93575 100644 --- a/__init__.py +++ b/__init__.py @@ -24,6 +24,11 @@ monkey.patch_all() from .compiler import start_workers #start_workers(1,1,1) +from src.bot import bot +if not app.debug or os.environ.get("WERKZEUG_RUN_MAIN") == "true": + bot.message_loop() + + # Framework @@ -88,11 +93,6 @@ app.register_blueprint(section_pages, url_prefix='/sections') app.register_blueprint(compiler_pages, url_prefix='/compiler') -from src.bot import bot -if not app.debug or os.environ.get("WERKZEUG_RUN_MAIN") == "true": - bot.message_loop() - - # ------------ Telegram Bot #from bot import bot_queue #@app.route('/bot', methods=['GET', 'POST'])