From 740ec40acea05ccd6dece5dc45e436c9d7aaf0a7 Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Sat, 4 Sep 2021 12:47:33 +0200 Subject: [PATCH] Use discord timestamps for whois diff --- cogs/modCommands.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cogs/modCommands.py b/cogs/modCommands.py index ab24afb..a6f2fda 100644 --- a/cogs/modCommands.py +++ b/cogs/modCommands.py @@ -182,15 +182,13 @@ class ModCommands(commands.Cog): embed = discord.Embed(colour=discord.Colour.blue()) embed.set_author(name=user.display_name, icon_url=user.avatar_url) - embed.add_field(name="Discriminator", value="#{}".format(user.discriminator)) + embed.add_field(name="Discriminator", value=f"#{user.discriminator}") embed.add_field(name="Discord id", value=user.id) embed.add_field(name="Bot", value="Nee" if not user.bot else "Ja") created_local = timeFormatters.epochToDate(user.created_at.timestamp()) - embed.add_field(name="Account aangemaakt", value="{}\n({} geleden)".format( - created_local["date"], timeFormatters.diffYearBasisString(round(created_local["dateDT"].timestamp())) - ), inline=False) + embed.add_field(name="Account aangemaakt", value=f"", inline=False) # Check if the user is in the current guild if ctx.guild is not None: @@ -199,9 +197,8 @@ class ModCommands(commands.Cog): if member_instance is not None: joined_local = timeFormatters.epochToDate(member_instance.joined_at.timestamp()) - embed.add_field(name="Lid geworden van {} op".format(ctx.guild.name), value="{}\n({} Geleden)".format( - joined_local["date"], timeFormatters.diffYearBasisString(round(joined_local["dateDT"].timestamp())) - )) + embed.add_field(name=f"Lid geworden van {ctx.guild.name}", + value=f"") embed.add_field(name="Mention String", value=member_instance.mention, inline=False)