Files
Discord.Net/docs/guides/samples/dependency_map_setup.cs
2016-07-22 01:48:24 -04:00

16 lines
433 B
C#

using Discord;
using Discord.Commands;
public class Commands
{
public async Task Install(DiscordSocketClient client)
{
var commands = new CommandService();
var map = new DependencyMap();
map.Add<IDiscordClient>(client);
var self = await client.GetCurrentUserAsync();
map.Add<ISelfUser>(self);
await commands.LoadAssembly(Assembly.GetCurrentAssembly(), map);
}
// ...
}