Set expirations on interactive modlog keys
This commit is contained in:
parent
e7c3b664db
commit
692200ea47
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
"""Cog wrapper for command caching."""
|
"""Cog wrapper for command caching."""
|
||||||
import logging
|
import logging
|
||||||
|
from datetime import timedelta
|
||||||
|
|
||||||
from jarvis_core.db import q
|
from jarvis_core.db import q
|
||||||
from jarvis_core.db.models import Ban, Kick, Mute, Setting, Warning
|
from jarvis_core.db.models import Ban, Kick, Mute, Setting, Warning
|
||||||
|
@ -102,6 +103,8 @@ class ModcaseCog(Cog):
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
message = await channel.send(embed=embed, components=components)
|
message = await channel.send(embed=embed, components=components)
|
||||||
await self.bot.redis.set(lookup_key, f"{name.lower()}|{action.id}")
|
|
||||||
|
|
||||||
await self.bot.redis.set(f"msg|{message.id}", user.id)
|
await self.bot.redis.set(
|
||||||
|
lookup_key, f"{name.lower()}|{action.id}", ex=timedelta(days=7)
|
||||||
|
)
|
||||||
|
await self.bot.redis.set(f"msg|{message.id}", user.id, ex=timedelta(days=7))
|
||||||
|
|
Loading…
Add table
Reference in a new issue