You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

dependency_map_setup.cs 458 B

1234567891011121314151617
  1. using Discord;
  2. using Discord.Commands;
  3. using Discord.WebSocket;
  4. public class Commands
  5. {
  6. public async Task Install(DiscordSocketClient client)
  7. {
  8. var commands = new CommandService();
  9. var map = new DependencyMap();
  10. map.Add<IDiscordClient>(client);
  11. var self = await client.GetCurrentUserAsync();
  12. map.Add<ISelfUser>(self);
  13. await commands.LoadAssembly(Assembly.GetCurrentAssembly(), map);
  14. }
  15. // ...
  16. }