More fixes to -hgit and commandlist

This commit is contained in:
Kwoth 2017-01-04 14:31:17 +01:00
parent bdfe3f1b36
commit 6a38192a87
2 changed files with 7 additions and 44 deletions

View File

@ -2,59 +2,17 @@ You can support the project on patreon: <https://patreon.com/nadekobot> or paypa
##Table Of Contents ##Table Of Contents
- [Help](#help) - [Help](#help)
- [Acropobia](#acropobia)
- [Administration](#administration) - [Administration](#administration)
- [AnimalRacing](#animalracing)
- [AnimeSearchCommands](#animesearchcommands)
- [AntiRaidCommands](#antiraidcommands)
- [AutoAssignRoleCommands](#autoassignrolecommands)
- [BlacklistCommands](#blacklistcommands)
- [CalcCommands](#calccommands)
- [ClashOfClans](#clashofclans) - [ClashOfClans](#clashofclans)
- [CleverBotCommands](#cleverbotcommands)
- [CmdCdsCommands](#cmdcdscommands)
- [CrossServerTextChannel](#crossservertextchannel)
- [CustomReactions](#customreactions) - [CustomReactions](#customreactions)
- [DMForwardCommands](#dmforwardcommands)
- [DrawCommands](#drawcommands)
- [DriceRollCommands](#dricerollcommands)
- [FilterCommands](#filtercommands)
- [FlipCoinCommands](#flipcoincommands)
- [Gambling](#gambling) - [Gambling](#gambling)
- [Games](#games) - [Games](#games)
- [HangmanCommands](#hangmancommands)
- [InfoCommands](#infocommands)
- [JokeCommands](#jokecommands)
- [LogCommands](#logcommands)
- [Migration](#migration)
- [Music](#music) - [Music](#music)
- [MuteCommands](#mutecommands)
- [NSFW](#nsfw) - [NSFW](#nsfw)
- [OsuCommands](#osucommands)
- [OverwatchCommands](#overwatchcommands)
- [Permissions](#permissions) - [Permissions](#permissions)
- [PlaceCommands](#placecommands)
- [PlantPickCommands](#plantpickcommands)
- [PlayingRotateCommands](#playingrotatecommands)
- [Pokemon](#pokemon) - [Pokemon](#pokemon)
- [PokemonSearchCommands](#pokemonsearchcommands)
- [PollCommands](#pollcommands)
- [QuoteCommands](#quotecommands)
- [RatelimitCommand](#ratelimitcommand)
- [RemindCommands](#remindcommands)
- [RepeatCommands](#repeatcommands)
- [Searches](#searches) - [Searches](#searches)
- [SelfAssignedRolesCommands](#selfassignedrolescommands)
- [SelfCommands](#selfcommands)
- [ServerGreetCommands](#servergreetcommands)
- [SpeedTypingCommands](#speedtypingcommands)
- [StreamNotificationCommands](#streamnotificationcommands)
- [TranslateCommands](#translatecommands)
- [TriviaCommands](#triviacommands)
- [UnitConverterCommands](#unitconvertercommands)
- [Utility](#utility) - [Utility](#utility)
- [VoicePlusTextCommands](#voiceplustextcommands)
- [XkcdCommands](#xkcdcommands)
### Administration ### Administration

View File

@ -127,7 +127,12 @@ namespace NadekoBot.Modules.Help
var helpstr = new StringBuilder(); var helpstr = new StringBuilder();
helpstr.AppendLine("You can support the project on patreon: <https://patreon.com/nadekobot> or paypal: <https://www.paypal.me/Kwoth>\n"); helpstr.AppendLine("You can support the project on patreon: <https://patreon.com/nadekobot> or paypal: <https://www.paypal.me/Kwoth>\n");
helpstr.AppendLine("##Table Of Contents"); helpstr.AppendLine("##Table Of Contents");
helpstr.AppendLine(string.Join("\n", NadekoBot.CommandService.Modules.Where(m => m.GetTopLevelModule().Name.ToLowerInvariant() != "help").OrderBy(m => m.Name).Prepend(NadekoBot.CommandService.Modules.FirstOrDefault(m=>m.Name.ToLowerInvariant()=="help")).Select(m => $"- [{m.Name}](#{m.Name.ToLowerInvariant()})"))); helpstr.AppendLine(string.Join("\n", NadekoBot.CommandService.Modules.Where(m => m.GetTopLevelModule().Name.ToLowerInvariant() != "help")
.Select(m => m.GetTopLevelModule().Name)
.Distinct()
.OrderBy(m => m)
.Prepend("Help")
.Select(m => $"- [{m}](#{m.ToLowerInvariant()})")));
helpstr.AppendLine(); helpstr.AppendLine();
string lastModule = null; string lastModule = null;
foreach (var com in NadekoBot.CommandService.Commands.OrderBy(com => com.Module.GetTopLevelModule().Name).GroupBy(c => c.Aliases.First()).Select(g => g.First())) foreach (var com in NadekoBot.CommandService.Commands.OrderBy(com => com.Module.GetTopLevelModule().Name).GroupBy(c => c.Aliases.First()).Select(g => g.First()))
@ -150,7 +155,7 @@ namespace NadekoBot.Modules.Help
} }
helpstr = helpstr.Replace(NadekoBot.Client.CurrentUser().Username , "@BotName"); helpstr = helpstr.Replace(NadekoBot.Client.CurrentUser().Username , "@BotName");
File.WriteAllText("../../docs/Commands List.md", helpstr.ToString()); File.WriteAllText("../../docs/Commands List.md", helpstr.ToString());
await Context.Channel.SendMessageAsync("").ConfigureAwait(false); await Context.Channel.SendConfirmAsync("Commandlist Regenerated").ConfigureAwait(false);
} }
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]