From b5b801f07fb16d3857cd0350e205e8f8c96efccc Mon Sep 17 00:00:00 2001 From: mctaylors Date: Thu, 7 Nov 2024 00:43:07 +0300 Subject: [PATCH] timestamp: Add list[str] for timestamp styles Signed-off-by: mctaylors --- client.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/client.py b/client.py index f382ee3..4c284a8 100644 --- a/client.py +++ b/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| `` | |" + await ctx.send(f"## {timestamp}\n" f"| Chat syntax | Result |\n" - f"| --- | --- |\n" - f"| `` | |\n" - f"| `` | |\n" - f"| `` | |\n" - f"| `` | |\n" - f"| `` | |\n" - f"| `` | |\n" - f"| `` | |") + f"| --- | --- |" + + table) @commands.command() async def self(self, ctx: commands.Context):