misc(aurora): added some markdown formatting
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 21s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 31s

This commit is contained in:
Seaswimmer 2024-05-04 21:20:05 -04:00
parent a8414a7918
commit e89db3de5a
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -2,17 +2,13 @@
from datetime import datetime, timedelta from datetime import datetime, timedelta
from typing import Union from typing import Union
from discord import (Color, Embed, Guild, Interaction, InteractionMessage, from discord import Color, Embed, Guild, Interaction, InteractionMessage, Member, Role, User
Member, Role, User)
from redbot.core import commands from redbot.core import commands
from redbot.core.utils.chat_formatting import (bold, box, error, from redbot.core.utils.chat_formatting import bold, box, error, humanize_timedelta, warning
humanize_timedelta, warning)
from aurora.models import Moderation, PartialUser from aurora.models import Moderation, PartialUser
from aurora.utilities.config import config from aurora.utilities.config import config
from aurora.utilities.utils import (fetch_channel_dict, fetch_user_dict, from aurora.utilities.utils import fetch_channel_dict, fetch_user_dict, get_bool_emoji, get_next_case_number, get_pagesize_str
get_bool_emoji, get_next_case_number,
get_pagesize_str)
async def message_factory( async def message_factory(
@ -169,7 +165,7 @@ async def case_factory(interaction: Interaction, moderation: Moderation) -> Embe
title=f"📕 Case #{moderation.id:,}", title=f"📕 Case #{moderation.id:,}",
color=await interaction.client.get_embed_color(interaction.channel), 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)}\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: if moderation.duration:
duration_embed = ( duration_embed = (
@ -205,7 +201,7 @@ async def case_factory(interaction: Interaction, moderation: Moderation) -> Embe
resolved_user = await moderation.get_resolved_by() resolved_user = await moderation.get_resolved_by()
embed.add_field( embed.add_field(
name="Resolve Reason", name="Resolve Reason",
value=f"Resolved by {resolved_user.name} ({resolved_user.id}) for:\n{box(moderation.resolve_reason)}", value=f"Resolved by `{resolved_user.name}` ({resolved_user.id}) for:\n{box(moderation.resolve_reason)}",
inline=False, inline=False,
) )