diff --git a/client.py b/client.py index 4bab57c..f382ee3 100644 --- a/client.py +++ b/client.py @@ -36,12 +36,12 @@ class Client(commands.CommandsClient): return if x > y: - message = randrange(y, x + 1) - await ctx.send(f"**{message}** `({y};{x})`") + result = randrange(y, x + 1) + await ctx.send(extensions.random_message(result, y, x)) return - message = randrange(x, y + 1) - await ctx.send(f"**{message}** `({x};{y})`") + result = randrange(x, y + 1) + await ctx.send(extensions.random_message(result, x, y)) @commands.command() async def timestamp(self, ctx: commands.Context): diff --git a/extensions.py b/extensions.py index d92dc5e..96c6d4a 100644 --- a/extensions.py +++ b/extensions.py @@ -1,2 +1,8 @@ def icon_info(icon): return f"[{icon.filename}](<{icon.url}>) ({icon.width}x{icon.height})" + +def random_message(result, min, max): + return (f"## {result}\n" + f"| Min | Max |\n" + f"| --- | --- |\n" + f"|{min}|{max}|")