Construct redis instance to pass into client
This commit is contained in:
parent
cd78b0e002
commit
7b3cf0dc95
1 changed files with 6 additions and 1 deletions
|
@ -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":
|
||||
|
|
Loading…
Add table
Reference in a new issue