Exemplo n.º 1
0
 public Bot(string[] answers, string strategyName)
 {
     Answers         = answers;
     AnswersStrategy = GetChatStrategy(strategyName);
     if (AnswersStrategy == null)
     {
         AnswersStrategy = GetDefaultIStrategy();
     }
 }
Exemplo n.º 2
0
        public void ChangeStrategy(string command)
        {
            var startegyName = command.Replace(Commands.Strategy, string.Empty).Trim();
            var strategy     = GetChatStrategy(startegyName);

            if (startegyName == null)
            {
                new ArgumentException($"Unknown strategy {startegyName}");
            }

            AnswersStrategy = strategy;
            Talk($"{GetResponse()} {BotMessages.ChangeStrategySuccess} : {startegyName}");
        }