Fix help command

This commit is contained in:
deadcade 2022-06-12 06:16:37 +02:00
parent e3ac2c9006
commit 7964fde51b

View file

@ -161,10 +161,10 @@ async def help(args, room, event):
# No command specified, send command list # No command specified, send command list
source_text = f"\n<a href=\"{settings['source_url']}\">Source Code</a>" if settings["source_url"] else "" source_text = f"\n<a href=\"{settings['source_url']}\">Source Code</a>" if settings["source_url"] else ""
helptext = "Admin Commands:\n" helptext = "Admin Commands:\n"
for command in settings["admin_command_list"].keys(): for command in settings["admin_command_list"]:
helptext += settings["help_messages"][command] + "\n" helptext += settings["help_messages"][command] + "\n"
helptext += "\nUser Commands:\n" helptext += "\nUser Commands:\n"
for command in settings["command_list"].keys(): for command in settings["command_list"]:
helptext += settings["help_messages"][command] + "\n" helptext += settings["help_messages"][command] + "\n"
helptext += "\n\nArguments: (optional) [required] {admin only, optional}" helptext += "\n\nArguments: (optional) [required] {admin only, optional}"
return await send_text(room.room_id, helptext.replace("{prefix}", settings["prefix"]) + source_text) return await send_text(room.room_id, helptext.replace("{prefix}", settings["prefix"]) + source_text)