Reformatting nickname embed

Got rid of unnecessary check
pull/8/head
sgoudham 4 years ago
parent 6829b3dcac
commit 510cd38f46

@ -550,13 +550,13 @@ class Moderation(Cog):
# Logging Nickname Updates # Logging Nickname Updates
if before.nick != after.nick: if before.nick != after.nick:
embed = Embed(description=f"{after.mention}'s **Nickname Changed**", embed = Embed(description=f"**{after.mention}'s Nickname Changed**",
colour=enso_embedmod_colours, colour=enso_embedmod_colours,
timestamp=datetime.datetime.utcnow()) timestamp=datetime.datetime.utcnow())
embed.set_author(name=after, icon_url=after.avatar_url) embed.set_author(name=after, icon_url=after.avatar_url)
embed.add_field(name="Nickname Before", embed.add_field(name="Before",
value=before.nick, inline=False) value=before.nick, inline=False)
embed.add_field(name="Nickname After", embed.add_field(name="After",
value=after.nick, inline=False) value=after.nick, inline=False)
embed.set_footer(text=f"ID: {after.id}") embed.set_footer(text=f"ID: {after.id}")
@ -567,8 +567,7 @@ class Moderation(Cog):
new_roles = [roles for roles in after.roles if roles not in before.roles] new_roles = [roles for roles in after.roles if roles not in before.roles]
old_roles = [roles for roles in before.roles if roles not in after.roles] old_roles = [roles for roles in before.roles if roles not in after.roles]
if len(new_roles) >= 1: new_roles_string = ", ".join(f"`{r.name}`" for r in new_roles)
new_roles_string = ",".join(f"`{r.name}`" for r in new_roles)
if len(new_roles) == 1: if len(new_roles) == 1:
desc = f"**{after.mention} was given the role** `{new_roles_string}`" desc = f"**{after.mention} was given the role** `{new_roles_string}`"
@ -584,7 +583,6 @@ class Moderation(Cog):
await modlogs_channel.send(embed=embed) await modlogs_channel.send(embed=embed)
if len(old_roles) >= 1:
old_roles_string = ", ".join(r.name for r in old_roles) old_roles_string = ", ".join(r.name for r in old_roles)
if len(old_roles) == 1: if len(old_roles) == 1:

Loading…
Cancel
Save