diff --git a/jarvis/__init__.py b/jarvis/__init__.py index c73d1ae..e1ea96a 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -22,15 +22,9 @@ file_handler.setFormatter( ) logger.addHandler(file_handler) -if jconfig.log_level == "DEBUG": - jurigged.watch() - intents = Intents.DEFAULT | Intents.MESSAGES | Intents.GUILD_MEMBERS | Intents.GUILD_MESSAGE_CONTENT restart_ctx = None -if jconfig.rook_token: - rook.start(token=jconfig.rook_token, labels={"env": "dev"}) - jarvis = Jarvis( intents=intents, sync_interactions=jconfig.sync, @@ -41,6 +35,10 @@ jarvis = Jarvis( async def run() -> None: """Run JARVIS""" + if jconfig.log_level == "DEBUG": + jurigged.watch() + if jconfig.rook_token: + rook.start(token=jconfig.rook_token, labels={"env": "dev"}) logger.info("Starting JARVIS") logger.debug("Connecting to database") connect(**jconfig.mongo["connect"], testing=jconfig.mongo["database"] != "jarvis")