help moved to its own module

This commit is contained in:
Master Kwoth 2016-02-15 23:06:14 +01:00
parent cb976ba3eb
commit ba1582bce0
4 changed files with 24 additions and 1 deletions

View File

@ -19,7 +19,6 @@ using Timer = System.Timers.Timer;
namespace NadekoBot.Modules { namespace NadekoBot.Modules {
class Administration : DiscordModule { class Administration : DiscordModule {
public Administration() : base() { public Administration() : base() {
commands.Add(new HelpCommand());
commands.Add(new ServerGreetCommand()); commands.Add(new ServerGreetCommand());
} }

22
NadekoBot/Modules/Help.cs Normal file
View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Discord.Modules;
namespace NadekoBot.Modules {
class Help : DiscordModule {
public Help() : base() {
commands.Add(new HelpCommand());
}
public override void Install(ModuleManager manager) {
manager.CreateCommands("", cgb => {
cgb.AddCheck(Classes.Permissions.PermissionChecker.Instance);
commands.ForEach(com => com.Init(cgb));
});
}
}
}

View File

@ -92,6 +92,7 @@ namespace NadekoBot {
//install modules //install modules
modules.Add(new Administration(), "Administration", ModuleFilter.None); modules.Add(new Administration(), "Administration", ModuleFilter.None);
modules.Add(new Help(), "Help", ModuleFilter.None);
modules.Add(new PermissionModule(), "Permissions", ModuleFilter.None); modules.Add(new PermissionModule(), "Permissions", ModuleFilter.None);
modules.Add(new Conversations(), "Conversations", ModuleFilter.None); modules.Add(new Conversations(), "Conversations", ModuleFilter.None);
modules.Add(new Gambling(), "Gambling", ModuleFilter.None); modules.Add(new Gambling(), "Gambling", ModuleFilter.None);

View File

@ -167,6 +167,7 @@
<Compile Include="Modules\DiscordModule.cs" /> <Compile Include="Modules\DiscordModule.cs" />
<Compile Include="Modules\Gambling.cs" /> <Compile Include="Modules\Gambling.cs" />
<Compile Include="Modules\Games.cs" /> <Compile Include="Modules\Games.cs" />
<Compile Include="Modules\Help.cs" />
<Compile Include="Modules\Music.cs" /> <Compile Include="Modules\Music.cs" />
<Compile Include="Commands\PollCommand.cs" /> <Compile Include="Commands\PollCommand.cs" />
<Compile Include="Modules\NSFW.cs" /> <Compile Include="Modules\NSFW.cs" />