Add docs for the Command Service

This commit is contained in:
Christopher F
2016-07-22 01:48:24 -04:00
parent ea6f8b457f
commit c5d63485c1
7 changed files with 202 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
using Discord;
using Discord.Commands;
[Module]
public class ModuleA
{
private DiscordSocketClient client;
private ISelfUser self;
public ModuleA(IDiscordClient c, ISelfUser s)
{
if (!(c is DiscordSocketClient)) throw new InvalidOperationException("This module requires a DiscordSocketClient");
client = c as DiscordSocketClient;
self = s;
}
}
public class ModuleB
{
private IDiscordClient client;
private CommandService commands;
public ModuleB(CommandService c, IDependencyMap m)
{
commands = c;
client = m.Get<IDiscordClient>();
}
}