private string AddCallByName(string originalText, string username) { if (!string.IsNullOrEmpty(username) && (KorraModelHelper.GetChance(3))) //33% chance to use the name { return(KorraModelHelper.FirstCharToUpper(username) + ", " + KorraModelHelper.FirstCharToLower(originalText)); } else { return(originalText); } }
public string SayGoodBye() { string text = "OK, "; string Username = factsManager.GetValueByName("UserName"); if (!string.IsNullOrEmpty(Username)) { Username = KorraModelHelper.FirstCharToUpper(Username); } text += KorraModelHelper.GetChance(new string[] { (KorraModelHelper.GetChance(3)) ? "bye" : "goodbye", "See you soon", "Have a good day" }); if (!string.IsNullOrEmpty(Username)) { text += " " + Username; } text += "."; return(text); }