fix(moderation): fixed formatting in some embed factory embeds

This commit is contained in:
Seaswimmer 2023-12-18 15:20:26 -05:00
parent e32e91180a
commit 5fa346bc75
Signed by untrusted user: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -132,7 +132,7 @@ async def embed_factory(embed_type: str, color: Color, /, interaction: Interact
target_name = f"`{target_user['name']}`" target_name = f"`{target_user['name']}`"
moderator_user = await fetch_user_dict(interaction, case_dict['moderator_id']) moderator_user = await fetch_user_dict(interaction, case_dict['moderator_id'])
moderator_name = moderator_user['name'] if moderator_user['discriminator'] == "0" else f"{moderator_user['name']}#{moderator_user['discriminator']}" moderator_name = f"`{moderator_user['name']}`" if moderator_user['discriminator'] == "0" else f"`{moderator_user['name']}#{moderator_user['discriminator']}`"
embed = Embed(title=f"📕 Case #{case_dict['moderation_id']:,} Resolved", color=color) embed = Embed(title=f"📕 Case #{case_dict['moderation_id']:,} Resolved", color=color)
@ -160,7 +160,7 @@ async def embed_factory(embed_type: str, color: Color, /, interaction: Interact
target_name = f"`{target_user['name']}`" target_name = f"`{target_user['name']}`"
moderator_user = await fetch_user_dict(interaction, case_dict['moderator_id']) moderator_user = await fetch_user_dict(interaction, case_dict['moderator_id'])
moderator_name = moderator_user['name'] if moderator_user['discriminator'] == "0" else f"{moderator_user['name']}#{moderator_user['discriminator']}" moderator_name = f"`{moderator_user['name']}`" if moderator_user['discriminator'] == "0" else f"`{moderator_user['name']}#{moderator_user['discriminator']}`"
embed = Embed(title=f"📕 Case #{case_dict['moderation_id']:,}", color=color) embed = Embed(title=f"📕 Case #{case_dict['moderation_id']:,}", color=color)
embed.description = f"**Type:** {str.title(case_dict['moderation_type'])}\n**Target:** {target_name} ({target_user['id']})\n**Moderator:** {moderator_name} ({moderator_user['id']})\n**Timestamp:** <t:{case_dict['timestamp']}> | <t:{case_dict['timestamp']}:R>" embed.description = f"**Type:** {str.title(case_dict['moderation_type'])}\n**Target:** {target_name} ({target_user['id']})\n**Moderator:** {moderator_name} ({moderator_user['id']})\n**Timestamp:** <t:{case_dict['timestamp']}> | <t:{case_dict['timestamp']}:R>"