mirror of
https://github.com/Nick80835/microbot
synced 2025-09-04 16:35:35 +00:00
make sudohelp less ugly
This commit is contained in:
@@ -77,15 +77,14 @@ async def sudohelp(event):
|
|||||||
await event.reply(f"**{command.pattern}** doesn't have a help string.")
|
await event.reply(f"**{command.pattern}** doesn't have a help string.")
|
||||||
return
|
return
|
||||||
|
|
||||||
prefix = ldr.prefix()
|
|
||||||
help_dict = {}
|
help_dict = {}
|
||||||
|
|
||||||
for command in ldr.command_handler.incoming_commands:
|
for command in ldr.command_handler.incoming_commands:
|
||||||
if command.hide_help:
|
if command.hide_help:
|
||||||
if command.module in help_dict:
|
if command.module in help_dict:
|
||||||
help_dict[command.module].append(prefix + command.pattern)
|
help_dict[command.module].append(command.pattern)
|
||||||
else:
|
else:
|
||||||
help_dict[command.module] = [prefix + command.pattern]
|
help_dict[command.module] = [command.pattern]
|
||||||
|
|
||||||
help_string = "\n".join([f"**{module}**: {', '.join(pattern_list)}" for module, pattern_list in help_dict.items()])
|
help_string = "\n".join([f"**{module}**: {', '.join(pattern_list)}" for module, pattern_list in help_dict.items()])
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user