public Bot(string[] answers, string strategyName) { Answers = answers; AnswersStrategy = GetChatStrategy(strategyName); if (AnswersStrategy == null) { AnswersStrategy = GetDefaultIStrategy(); } }
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}"); }