// How Are You Doing Bot // Asks how you are doing and also gives a response depending on what the user said using System; namespace ChatBot { class HowAreYouDoingBot : BasicBot { public override string HandleMessage(string message, string user) { if (state == "1") // Check to see if we already asked how they are doing { state = "0"; if (User.RegexMatch("well|great|good", message)) { return "Glad to hear it!"; } else { return "Sorry to hear that."; } } state = "1"; // Asked how they are doing return "How are you doing?"; } } }