From b907ff6819b72309dc59a91ac94f3e6c795c9662 Mon Sep 17 00:00:00 2001 From: MuffinMedic Date: Tue, 9 Jan 2018 14:35:53 -0500 Subject: [PATCH] Sort cmdinfo and potential match help outputs --- cloudbot/bot.py | 2 +- plugins/core/help.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudbot/bot.py b/cloudbot/bot.py index 538336c82..2b3e05f3a 100644 --- a/cloudbot/bot.py +++ b/cloudbot/bot.py @@ -314,7 +314,7 @@ def add_hook(hook, _event, _run_before=False): add_hook(command_hook, command_event) else: event.notice("Possible matches: {}".format( - formatting.get_text_list([command for command, plugin in potential_matches]))) + formatting.get_text_list(sorted([command for command, plugin in potential_matches])))) if event.type in (EventType.message, EventType.action): # Regex hooks diff --git a/plugins/core/help.py b/plugins/core/help.py index d711d0c5b..4c669ef65 100644 --- a/plugins/core/help.py +++ b/plugins/core/help.py @@ -92,7 +92,7 @@ def cmdinfo(text, bot, notice): cmd_hook = potentials[0][1] else: notice("Possible matches: {}".format( - formatting.get_text_list([command for command, plugin in potentials]))) + formatting.get_text_list(sorted([command for command, plugin in potentials])))) return else: cmd_hook = None