From 1908ed827f46bb94a3d7e232d4d5a4fde6d97cf3 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sun, 17 Jul 2016 21:19:18 +0200 Subject: [PATCH] -commands command now prints in alphabetical order --- NadekoBot/Modules/Help/Commands/HelpCommand.cs | 2 +- NadekoBot/Modules/Help/HelpModule.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NadekoBot/Modules/Help/Commands/HelpCommand.cs b/NadekoBot/Modules/Help/Commands/HelpCommand.cs index 2b4ad3b8..3bf86435 100644 --- a/NadekoBot/Modules/Help/Commands/HelpCommand.cs +++ b/NadekoBot/Modules/Help/Commands/HelpCommand.cs @@ -43,7 +43,7 @@ namespace NadekoBot.Classes.Help.Commands { string helpstr = $@"######For more information and how to setup your own NadekoBot, go to: **http://github.com/Kwoth/NadekoBot/** -######You can donate on paypal: `nadekodiscordbot@gmail.com` or Bitcoin `17MZz1JAqME39akMLrVT4XBPffQJ2n1EPa` +######You can donate on paypal: `nadekodiscordbot@gmail.com` #NadekoBot List Of Commands Version: `{NadekoStats.Instance.BotVersion}`"; diff --git a/NadekoBot/Modules/Help/HelpModule.cs b/NadekoBot/Modules/Help/HelpModule.cs index 941ffa9e..20e8279c 100644 --- a/NadekoBot/Modules/Help/HelpModule.cs +++ b/NadekoBot/Modules/Help/HelpModule.cs @@ -46,7 +46,9 @@ namespace NadekoBot.Modules.Help if (string.IsNullOrWhiteSpace(module)) return; var cmds = NadekoBot.Client.GetService().AllCommands - .Where(c => c.Category.ToLower() == module); + .Where(c => c.Category.ToLower() == module) + .OrderBy(c=>c.Text) + .AsEnumerable(); var cmdsArray = cmds as Command[] ?? cmds.ToArray(); if (!cmdsArray.Any()) {