From c82fc0e78c84d1bdbe807d3f7e6aae165997e017 Mon Sep 17 00:00:00 2001 From: Mary Date: Thu, 30 Mar 2023 20:38:03 +0200 Subject: [PATCH] Fix macros command --- robocop_ng/cogs/macro.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/robocop_ng/cogs/macro.py b/robocop_ng/cogs/macro.py index 412b2be..b179d17 100644 --- a/robocop_ng/cogs/macro.py +++ b/robocop_ng/cogs/macro.py @@ -53,10 +53,11 @@ class Macro(Cog): async def list_macros(self, ctx: Context): macros = get_macros() if len(macros) > 0: - await ctx.send( - "📝 **Macros**:\n" - "\n".join([f"- {key}" for key in macros.keys()]) - ) + macros = [f"- {key}\n" for key in sorted(macros.keys())] + message = "📝 **Macros**:\n" + for macro_key in macros: + message += macro_key + await ctx.send(message) else: await ctx.send("Couldn't find any macros.")