fixed timestamps

This commit is contained in:
SeaswimmerTheFsh 2023-02-28 04:48:02 -05:00
parent 0b681954e0
commit dcd49ad80a

View file

@ -22,8 +22,9 @@ class Galaxy(commands.Cog):
colorint = role.color.value
color = re.sub('#',"",str(role.color))
colorcodelink = f"https://www.color-hex.com/color/{color}"
timestamp = int(datetime.timestamp(role.created_at))
if permissions.administrator:
embed = discord.Embed(title=f"{role.name}", color=colorint, description=f"**ID:** {role.id}\n**Mention:** {role.mention}\n**Creation Date:** <t:{datetime.timestamp(role.created_at)}>\n**Color:** [#{color}]({colorcodelink})\n**Hoisted:** {role.hoist}\n**Position:** {role.position}\n**Managed:** {role.managed}\n**Mentionable:** {role.mentionable}\n**Administrator:** {role.permissions.administrator}")
embed = discord.Embed(title=f"{role.name}", color=colorint, description=f"**ID:** {role.id}\n**Mention:** {role.mention}\n**Creation Date:** <t:{timestamp}>\n**Color:** [#{color}]({colorcodelink})\n**Hoisted:** {role.hoist}\n**Position:** {role.position}\n**Managed:** {role.managed}\n**Mentionable:** {role.mentionable}\n**Administrator:** {role.permissions.administrator}")
else:
embed = discord.Embed(color=colorint, description="Without Administrator")
await ctx.send(embed=embed)