Move rook, jurigged start to run
This commit is contained in:
parent
5fbd153245
commit
73cb150339
1 changed files with 4 additions and 6 deletions
|
@ -22,15 +22,9 @@ file_handler.setFormatter(
|
||||||
)
|
)
|
||||||
logger.addHandler(file_handler)
|
logger.addHandler(file_handler)
|
||||||
|
|
||||||
if jconfig.log_level == "DEBUG":
|
|
||||||
jurigged.watch()
|
|
||||||
|
|
||||||
intents = Intents.DEFAULT | Intents.MESSAGES | Intents.GUILD_MEMBERS | Intents.GUILD_MESSAGE_CONTENT
|
intents = Intents.DEFAULT | Intents.MESSAGES | Intents.GUILD_MEMBERS | Intents.GUILD_MESSAGE_CONTENT
|
||||||
restart_ctx = None
|
restart_ctx = None
|
||||||
|
|
||||||
if jconfig.rook_token:
|
|
||||||
rook.start(token=jconfig.rook_token, labels={"env": "dev"})
|
|
||||||
|
|
||||||
jarvis = Jarvis(
|
jarvis = Jarvis(
|
||||||
intents=intents,
|
intents=intents,
|
||||||
sync_interactions=jconfig.sync,
|
sync_interactions=jconfig.sync,
|
||||||
|
@ -41,6 +35,10 @@ jarvis = Jarvis(
|
||||||
|
|
||||||
async def run() -> None:
|
async def run() -> None:
|
||||||
"""Run JARVIS"""
|
"""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.info("Starting JARVIS")
|
||||||
logger.debug("Connecting to database")
|
logger.debug("Connecting to database")
|
||||||
connect(**jconfig.mongo["connect"], testing=jconfig.mongo["database"] != "jarvis")
|
connect(**jconfig.mongo["connect"], testing=jconfig.mongo["database"] != "jarvis")
|
||||||
|
|
Loading…
Add table
Reference in a new issue