예제 #1
0
        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> >();
        }
예제 #2
0
        internal CommandHandler(AdvisorCore advisor)
        {
            _advisor       = advisor;
            _commands      = advisor.GetService <CommandRegistry>();
            _configService = advisor.GetService <ConfigurationService>();

            Chat.OnChatMessage += args =>
            {
                HandleChatMessage(args.Sender, args.Message);
            };
        }
 public AdvisorServiceContainer(AdvisorCore core)
 {
     _services = new Dictionary <Type, object>();
     Advisor   = core;
 }