Splitting and renaming userinfo.cs, adding commands endpoint to api, minor refactor in other places

This commit is contained in:
Runebaas 2017-10-03 00:22:26 +02:00
parent 92015d8880
commit 09dbb6b14d
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6
9 changed files with 364 additions and 230 deletions

View file

@ -7,11 +7,11 @@ namespace Geekbot.net.Commands
{
public class Help : ModuleBase
{
private readonly CommandService commands;
private readonly CommandService _commands;
public Help(CommandService commands)
{
this.commands = commands;
_commands = commands;
}
[Command("help", RunMode = RunMode.Async)]
@ -23,7 +23,7 @@ namespace Geekbot.net.Commands
sb.AppendLine("**Geekbot Command list**");
sb.AppendLine("");
sb.AppendLine(tp("Name", 15) + tp("Parameters", 19) + "Description");
foreach (var cmd in commands.Commands)
foreach (var cmd in _commands.Commands)
{
var param = string.Join(", !", cmd.Aliases);
if (!param.Contains("admin"))