feat(galaxy): improved unix command
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
This commit is contained in:
parent
0000bec73f
commit
d539d03b5f
1 changed files with 9 additions and 2 deletions
|
@ -152,9 +152,16 @@ class Galaxy(commands.Cog):
|
||||||
async def unix(self, ctx: commands.Context):
|
async def unix(self, ctx: commands.Context):
|
||||||
"""Posts the current Unix timestamp."""
|
"""Posts the current Unix timestamp."""
|
||||||
timestamp = int(datetime.timestamp(datetime.now()))
|
timestamp = int(datetime.timestamp(datetime.now()))
|
||||||
embed=discord.Embed(title="Current Time", url="https://www.unixtimestamp.com/", color=await self.bot.get_embed_color(None), description=f"<t:{timestamp}>")
|
embed=discord.Embed(title="Current Time", url="https://www.unixtimestamp.com/", color=await self.bot.get_embed_color(None))
|
||||||
|
embed.add_field(name="Default", value=f"<t:{timestamp}>/n`<t:{timestamp}>`")
|
||||||
|
embed.add_field(name="Short Time", value=f"<t:{timestamp}:t>/n`<t:{timestamp}:t>`")
|
||||||
|
embed.add_field(name="Long Time", value=f"<t:{timestamp}:T>/n`<t:{timestamp}:T>`")
|
||||||
|
embed.add_field(name="Short Date", value=f"<t:{timestamp}:d>/n`<t:{timestamp}:d>`")
|
||||||
|
embed.add_field(name="Long Date", value=f"<t:{timestamp}:D>/n`<t:{timestamp}:D>`")
|
||||||
|
embed.add_field(name="Short Date/Time", value=f"<t:{timestamp}:f>/n`<t:{timestamp}:f>`")
|
||||||
|
embed.add_field(name="Long Date/Time", value=f"<t:{timestamp}:F>/n`<t:{timestamp}:F>`")
|
||||||
|
embed.add_field(name="Relative Time", value=f"<t:{timestamp}:R>/n`<t:{timestamp}:R>`")
|
||||||
embed.set_footer(text=f"{timestamp}")
|
embed.set_footer(text=f"{timestamp}")
|
||||||
embed.set_image(url="https://cdn.discordapp.com/attachments/1047347377348030494/1080048421127335956/image.png")
|
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
await ctx.message.delete()
|
await ctx.message.delete()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue