Construct redis instance to pass into client

This commit is contained in:
Zeva Rose 2022-05-03 01:11:49 -06:00
parent cd78b0e002
commit 7b3cf0dc95

View file

@ -1,6 +1,7 @@
"""Main JARVIS package."""
import logging
import aioredis
import jurigged
import rook
from jarvis_core.db import connect
@ -30,13 +31,17 @@ async def run() -> None:
intents = (
Intents.DEFAULT | Intents.MESSAGES | Intents.GUILD_MEMBERS | Intents.GUILD_MESSAGE_CONTENT
)
redis_config = jconfig.redis.copy()
redis_host = redis_config.pop("host")
redis = await aioredis.from_url(redis_host, **redis_config)
jarvis = Jarvis(
intents=intents,
sync_interactions=jconfig.sync,
delete_unused_application_cmds=True,
send_command_tracebacks=False,
redis=jconfig.redis,
redis=redis,
)
if jconfig.log_level == "DEBUG":