internal CommandHandler(AdvisorCore advisor) { _advisor = advisor; _commands = advisor.GetService <CommandRegistry>(); _configService = advisor.GetService <ConfigurationService>(); Chat.OnChatMessage += args => { HandleChatMessage(args.Sender, args.Message); }; }
internal CommandRegistry(AdvisorCore advisor) { _advisor = advisor; _configuration = advisor.GetService <ConfigurationService>(); _loadedModules = new Dictionary <Type, CommandModule>(); _converters = new Dictionary <Type, IArgumentConverter>(); _rootCommands = new Dictionary <string, Command>(); _categorizedCommands = new Dictionary <string, Dictionary <string, Command> >(); }