diff --git a/modules/help.py b/modules/help.py index 4f4675e..e50389e 100755 --- a/modules/help.py +++ b/modules/help.py @@ -45,14 +45,14 @@ def help(bot, trigger): else: if trigger.owner: - cmds = [cmd for _, cmd in bot.commands.items()] + funcs = [func for cmd, func in bot.commands.items()] elif trigger.admin: - cmds = [cmd for _, cmd in bot.commands.items() if cmd.priv <= 5] + funcs = [func for cmd, func in bot.commands.items() if cmd.priv <= 5] else: priv = bot.channels[trigger.channel].privileges[trigger.nick] - cmds = [cmd for _, cmd in bot.commands.items() if cmd.priv <= priv] + funcs = [func for cmd, func in bot.commands.items() if cmd.priv <= priv] - cmds = [cmd.name for cmd in cmds if cmd.canonical] - cmds = sorted(cmds) + cmds = {func.commands[0] for func in funcs} + cmds = sorted(list(cmds)) msg = "Available commands: " + ", ".join(cmds) bot.msg(msg)