diff --git a/jarvis/client.py b/jarvis/client.py index c5c5532..e582190 100644 --- a/jarvis/client.py +++ b/jarvis/client.py @@ -659,6 +659,7 @@ class Jarvis(Client): return user_key = f"msg|{context.message.id}" + action_key = "" if context.custom_id == "modcase|yes": if user_id := await self.redis.get(user_key): @@ -698,12 +699,11 @@ class Jarvis(Client): self.logger.warn("Unable to get action data ( %s )", action_key) await context.send("Unable to get action data", ephemeral=True) - await self.bot.redis.delete(user_key) - await self.bot.redis.delete(action_key) - for row in context.message.components: for component in row.components: component.disabled = True await context.message.edit(components=context.message.components) msg = "Cancelled" if context.custom_id == "modcase|no" else "Moderation case opened" await context.send(msg) + await self.bot.redis.delete(user_key) + await self.bot.redis.delete(action_key)