fix(moderation): resolved moderations will be set as expired now
Some checks failed
Pylint / Pylint (push) Failing after 1m13s
Some checks failed
Pylint / Pylint (push) Failing after 1m13s
This commit is contained in:
parent
df49498da7
commit
e22910b27b
1 changed files with 1 additions and 1 deletions
|
@ -387,7 +387,7 @@ class Moderation(commands.Cog):
|
||||||
embed = discord.Embed(title=f"📕 Case #{case['moderation_id']}", color=await self.bot.get_embed_color(None))
|
embed = discord.Embed(title=f"📕 Case #{case['moderation_id']}", color=await self.bot.get_embed_color(None))
|
||||||
embed.description = f"**Type:** {str.title(case['moderation_type'])}\n**Target:** {target_name} ({target.id})\n**Moderator:** {moderator_name} ({moderator.id})\n**Resolved:** {bool(case['resolved'])}\n**Timestamp:** <t:{case['timestamp']}> | <t:{case['timestamp']}:R>"
|
embed.description = f"**Type:** {str.title(case['moderation_type'])}\n**Target:** {target_name} ({target.id})\n**Moderator:** {moderator_name} ({moderator.id})\n**Resolved:** {bool(case['resolved'])}\n**Timestamp:** <t:{case['timestamp']}> | <t:{case['timestamp']}:R>"
|
||||||
if case['duration'] != 'NULL':
|
if case['duration'] != 'NULL':
|
||||||
expired = True if case["end_timestamp"] <= time.time() else False
|
expired = True if case["end_timestamp"] <= time.time() or case['resolved'] == 1 else False
|
||||||
embed.description = embed.description + f"\n**Duration:** {humanize.precisedelta(case['duration'])}\n**Expired:** {expired}"
|
embed.description = embed.description + f"\n**Duration:** {humanize.precisedelta(case['duration'])}\n**Expired:** {expired}"
|
||||||
embed.add_field(name='Reason', value=f"```{case['reason']}```")
|
embed.add_field(name='Reason', value=f"```{case['reason']}```")
|
||||||
if case['resolved'] == 1:
|
if case['resolved'] == 1:
|
||||||
|
|
Loading…
Reference in a new issue