-commands command now prints in alphabetical order

This commit is contained in:
Kwoth 2016-07-17 21:19:18 +02:00
parent 4b9ae7b403
commit 1908ed827f
2 changed files with 4 additions and 2 deletions

View File

@ -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}`";

View File

@ -46,7 +46,9 @@ namespace NadekoBot.Modules.Help
if (string.IsNullOrWhiteSpace(module))
return;
var cmds = NadekoBot.Client.GetService<CommandService>().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())
{