mirror of
https://git.mctaylors.ru/mctaylors/Lurker.git
synced 2024-11-23 06:08:02 +03:00
timestamp: Add list[str] for timestamp styles
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
befd494de2
commit
b5b801f07f
1 changed files with 8 additions and 10 deletions
18
client.py
18
client.py
|
@ -46,17 +46,15 @@ class Client(commands.CommandsClient):
|
|||
@commands.command()
|
||||
async def timestamp(self, ctx: commands.Context):
|
||||
"""Shows current timestamp"""
|
||||
message = trunc(time())
|
||||
await ctx.send(f"## {message}\n"
|
||||
timestamp = trunc(time())
|
||||
table = str()
|
||||
styles = ['d', 'D', 't', 'T', 'f', 'F', 'R']
|
||||
for style in styles:
|
||||
table = table + f"\n| `<t:{timestamp}:{style}>` | <t:{timestamp}:{style}> |"
|
||||
await ctx.send(f"## {timestamp}\n"
|
||||
f"| Chat syntax | Result |\n"
|
||||
f"| --- | --- |\n"
|
||||
f"| `<t:{message}:d>` | <t:{message}:d> |\n"
|
||||
f"| `<t:{message}:D>` | <t:{message}:D> |\n"
|
||||
f"| `<t:{message}:t>` | <t:{message}:t> |\n"
|
||||
f"| `<t:{message}:T>` | <t:{message}:T> |\n"
|
||||
f"| `<t:{message}:f>` | <t:{message}:f> |\n"
|
||||
f"| `<t:{message}:F>` | <t:{message}:F> |\n"
|
||||
f"| `<t:{message}:R>` | <t:{message}:R> |")
|
||||
f"| --- | --- |"
|
||||
+ table)
|
||||
|
||||
@commands.command()
|
||||
async def self(self, ctx: commands.Context):
|
||||
|
|
Loading…
Reference in a new issue