Exemplo n.º 1
0
        internal CommandHandler(AdvisorCore advisor)
        {
            _advisor       = advisor;
            _commands      = advisor.GetService <CommandRegistry>();
            _configService = advisor.GetService <ConfigurationService>();

            Chat.OnChatMessage += args =>
            {
                HandleChatMessage(args.Sender, args.Message);
            };
        }
Exemplo n.º 2
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> >();
        }