WIP: Refactor Aurora (3.0.0) #29
2 changed files with 5 additions and 5 deletions
|
@ -42,7 +42,7 @@ class Moderation(AuroraGuildModel):
|
|||
return self.moderation_id
|
||||
|
||||
@property
|
||||
def type(self) -> str:
|
||||
def type(self) -> Type:
|
||||
return self.moderation_type
|
||||
|
||||
@property
|
||||
|
|
|
@ -116,7 +116,7 @@ async def log_factory(
|
|||
)
|
||||
|
||||
resolved_by = await moderation.get_resolved_by()
|
||||
embed.description = f"**Type:** {str.title(moderation.moderation_type)}\n**Target:** {target.name} ({target.id})\n**Moderator:** {moderator.name} ({moderator.id})\n**Timestamp:** <t:{moderation.unix_timestamp}> | <t:{moderation.unix_timestamp}:R>"
|
||||
embed.description = f"**Type:** {str.title(moderation.type.string)}\n**Target:** {target.name} ({target.id})\n**Moderator:** {moderator.name} ({moderator.id})\n**Timestamp:** <t:{moderation.unix_timestamp}> | <t:{moderation.unix_timestamp}:R>"
|
||||
|
||||
if moderation.duration is not None:
|
||||
duration_embed = (
|
||||
|
@ -146,7 +146,7 @@ async def log_factory(
|
|||
title=f"📕 Case #{moderation.id:,}",
|
||||
color=await ctx.bot.get_embed_color(ctx.channel),
|
||||
)
|
||||
embed.description = f"**Type:** {str.title(moderation.type)}\n**Target:** {target.name} ({target.id})\n**Moderator:** {moderator.name} ({moderator.id})\n**Timestamp:** <t:{moderation.unix_timestamp}> | <t:{moderation.unix_timestamp}:R>"
|
||||
embed.description = f"**Type:** {str.title(moderation.type.string)}\n**Target:** {target.name} ({target.id})\n**Moderator:** {moderator.name} ({moderator.id})\n**Timestamp:** <t:{moderation.unix_timestamp}> | <t:{moderation.unix_timestamp}:R>"
|
||||
|
||||
if moderation.duration:
|
||||
embed.description = (
|
||||
|
@ -176,7 +176,7 @@ async def case_factory(interaction: Interaction, moderation: Moderation) -> Embe
|
|||
title=f"📕 Case #{moderation.id:,}",
|
||||
color=await interaction.client.get_embed_color(interaction.channel),
|
||||
)
|
||||
embed.description = f"**Type:** {str.title(moderation.type)}\n**Target:** `{target.name}` ({target.id})\n**Moderator:** `{moderator.name}` ({moderator.id})\n**Resolved:** {moderation.resolved}\n**Timestamp:** <t:{moderation.unix_timestamp}> | <t:{moderation.unix_timestamp}:R>"
|
||||
embed.description = f"**Type:** {str.title(moderation.type.string)}\n**Target:** `{target.name}` ({target.id})\n**Moderator:** `{moderator.name}` ({moderator.id})\n**Resolved:** {moderation.resolved}\n**Timestamp:** <t:{moderation.unix_timestamp}> | <t:{moderation.unix_timestamp}:R>"
|
||||
|
||||
if moderation.duration:
|
||||
duration_embed = (
|
||||
|
@ -284,7 +284,7 @@ async def evidenceformat_factory(moderation: Moderation) -> str:
|
|||
target = await moderation.get_target()
|
||||
moderator = await moderation.get_moderator()
|
||||
|
||||
content = f"Case: {moderation.id:,} ({str.title(moderation.type)})\nTarget: {target.name} ({target.id})\nModerator: {moderator.name} ({moderator.id})"
|
||||
content = f"Case: {moderation.id:,} ({str.title(moderation.type.string)})\nTarget: {target.name} ({target.id})\nModerator: {moderator.name} ({moderator.id})"
|
||||
|
||||
if moderation.duration is not None:
|
||||
content += f"\nDuration: {humanize_timedelta(timedelta=moderation.duration)}"
|
||||
|
|
Loading…
Reference in a new issue