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 433 B

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