public CommandHandler(DiscordSocketClient client, ServiceDependencyMap dependencyMap) { _client = client; _dependencyMap = dependencyMap; _commandService = new CommandService(new CommandServiceConfig() { DefaultRunMode = RunMode.Sync, CaseSensitiveCommands = false }); _commandService.AddTypeReader <DateTime>(new DateTypeReader()); _commandService.AddTypeReader <Segment>(new SegmentTypeReader(_dependencyMap)); _commandService.AddTypeReader <Profile>(new ProfileTypeReader(_dependencyMap)); HelpService.RegisterCommandService(_commandService); ExtendedModuleBase.SetDependencyMap(dependencyMap); _client.MessageReceived += handler; }
public HelpCommand() { _helpService = DepMap.GetService <HelpService>(); _client = DepMap.Get <DiscordSocketClient>(); }