Use model_dump instead of json

This commit is contained in:
Zeva Rose 2023-08-27 17:00:27 -06:00
parent 66e39cbea9
commit a6f99b2041

View file

@ -77,13 +77,13 @@ async def run() -> None:
| Intents.GUILD_MESSAGES | Intents.GUILD_MESSAGES
| Intents.MESSAGE_CONTENT | Intents.MESSAGE_CONTENT
) )
redis_config = config.redis.dict() redis_config = config.redis.model_dump()
redis_host = redis_config.pop("host") redis_host = redis_config.pop("host")
redis = await aioredis.from_url(redis_host, decode_responses=True, **redis_config) redis = await aioredis.from_url(redis_host, decode_responses=True, **redis_config)
await connect( await connect(
**config.mongo.dict(), **config.mongo.model_dump(),
testing=config.environment.value == "develop", testing=config.environment.value == "develop",
extra_models=[StaticStat, Stat], extra_models=[StaticStat, Stat],
) )