Fix macros command

This commit is contained in:
Mary 2023-03-30 20:38:03 +02:00
parent 29b2412513
commit c82fc0e78c

View file

@ -53,10 +53,11 @@ class Macro(Cog):
async def list_macros(self, ctx: Context): async def list_macros(self, ctx: Context):
macros = get_macros() macros = get_macros()
if len(macros) > 0: if len(macros) > 0:
await ctx.send( macros = [f"- {key}\n" for key in sorted(macros.keys())]
"📝 **Macros**:\n" message = "📝 **Macros**:\n"
"\n".join([f"- {key}" for key in macros.keys()]) for macro_key in macros:
) message += macro_key
await ctx.send(message)
else: else:
await ctx.send("Couldn't find any macros.") await ctx.send("Couldn't find any macros.")