Update Documentation to be compatible with Beta2
this one took a while
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Discord;
|
||||
using Discord.Commands;
|
||||
using Discord.WebSocket;
|
||||
using foxboat.Services;
|
||||
|
||||
public class Commands
|
||||
{
|
||||
@@ -8,10 +9,16 @@ public class Commands
|
||||
{
|
||||
var commands = new CommandService();
|
||||
var map = new DependencyMap();
|
||||
map.Add<IDiscordClient>(client);
|
||||
var self = await client.GetCurrentUserAsync();
|
||||
map.Add<ISelfUser>(self);
|
||||
map.Add(client);
|
||||
map.Add(commands);
|
||||
await commands.LoadAssembly(Assembly.GetCurrentAssembly(), map);
|
||||
}
|
||||
// In ConfigureServices, we will inject the Dependency Map with
|
||||
// all of the services our client will use.
|
||||
public Task ConfigureServices(IDependencyMap map)
|
||||
{
|
||||
map.Add(new NotificationService(map));
|
||||
map.Add(new DatabaseService(map));
|
||||
}
|
||||
// ...
|
||||
}
|
||||
Reference in New Issue
Block a user