Skip to content

Commit ffa0f8f

Browse files
authored
Merge pull request #174 from MuffinMedic/help
Sort cmdinfo and potential match help outputs
2 parents 4b05e15 + b907ff6 commit ffa0f8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cloudbot/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def add_hook(hook, _event, _run_before=False):
314314
add_hook(command_hook, command_event)
315315
else:
316316
event.notice("Possible matches: {}".format(
317-
formatting.get_text_list([command for command, plugin in potential_matches])))
317+
formatting.get_text_list(sorted([command for command, plugin in potential_matches]))))
318318

319319
if event.type in (EventType.message, EventType.action):
320320
# Regex hooks

plugins/core/help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def cmdinfo(text, bot, notice):
9292
cmd_hook = potentials[0][1]
9393
else:
9494
notice("Possible matches: {}".format(
95-
formatting.get_text_list([command for command, plugin in potentials])))
95+
formatting.get_text_list(sorted([command for command, plugin in potentials]))))
9696
return
9797
else:
9898
cmd_hook = None

0 commit comments

Comments
 (0)