fix(moderation): fixed markdown being applied to usernames
All checks were successful
Pylint / Pylint (push) Successful in 1m12s
All checks were successful
Pylint / Pylint (push) Successful in 1m12s
This commit is contained in:
parent
d55d37954d
commit
0d180d16c4
1 changed files with 1 additions and 1 deletions
|
@ -269,7 +269,7 @@ class Moderation(commands.Cog):
|
||||||
if embed_type == 'case':
|
if embed_type == 'case':
|
||||||
target_user = await self.fetch_user_dict(interaction, case_dict['target_id'])
|
target_user = await self.fetch_user_dict(interaction, case_dict['target_id'])
|
||||||
moderator_user = await self.fetch_user_dict(interaction, case_dict['moderator_id'])
|
moderator_user = await self.fetch_user_dict(interaction, case_dict['moderator_id'])
|
||||||
target_name = target_user['name'] if target_user['discriminator'] == "0" else f"{target_user['name']}#{target_user['discriminator']}"
|
target_name = f"`{target_user['name']}`" if target_user['discriminator'] == "0" else f"`{target_user['name']}#{target_user['discriminator']}`"
|
||||||
moderator_name = moderator_user['name'] if moderator_user['discriminator'] == "0" else f"{moderator_user['name']}#{moderator_user['discriminator']}"
|
moderator_name = moderator_user['name'] if moderator_user['discriminator'] == "0" else f"{moderator_user['name']}#{moderator_user['discriminator']}"
|
||||||
embed = discord.Embed(title=f"📕 Case #{case_dict['moderation_id']}", color=await self.bot.get_embed_color(None))
|
embed = discord.Embed(title=f"📕 Case #{case_dict['moderation_id']}", color=await self.bot.get_embed_color(None))
|
||||||
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**Resolved:** {bool(case_dict['resolved'])}\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**Resolved:** {bool(case_dict['resolved'])}\n**Timestamp:** <t:{case_dict['timestamp']}> | <t:{case_dict['timestamp']}:R>"
|
||||||
|
|
Loading…
Reference in a new issue