timestamp: Send formatted timestamp

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-11-06 23:26:04 +03:00
parent 4b7b7bc062
commit 92797df873
Signed by: mctaylors
GPG key ID: 4EEF4F949A266EE2

View file

@ -37,17 +37,17 @@ class Client(commands.CommandsClient):
if x > y: if x > y:
message = randrange(y, x + 1) message = randrange(y, x + 1)
await ctx.send(f"**{str(message)}** `({y};{x})`") await ctx.send(f"**{message}** `({y};{x})`")
return return
message = randrange(x, y + 1) message = randrange(x, y + 1)
await ctx.send(f"**{str(message)}** `({x};{y})`") await ctx.send(f"**{message}** `({x};{y})`")
@commands.command() @commands.command()
async def timestamp(self, ctx: commands.Context): async def timestamp(self, ctx: commands.Context):
"""Shows current timestamp""" """Shows current timestamp"""
message = trunc(time()) message = trunc(time())
await ctx.send(str(message)) await ctx.send(f"**{message}** <t:{message}:f>")
@commands.command() @commands.command()
async def self(self, ctx: commands.Context): async def self(self, ctx: commands.Context):