private void OnConversationReceived(Conversation sender, MessageEventArgs e) { Console.Text = sender.Messenger.Owner.Name + "User said: " + e.Message.Text; ind = pi.chatWithPrelude(e.Message.Text); Console.Text = "I, Prelude, say: " + ind ; sender.SendMessage(ind); if(e.Message.Text == "exit__") pi.stopPreludeEngine(); }
private void ContactJoined(Conversation sender, ContactEventArgs e) { // someone joined our conversation! remember that this also occurs when you are // only talking to 1 other person. Log this event. Console.Text = e.Contact.Name + " joined the conversation.\r\n"; // now say something back. You can send messages using the Conversation object. sender.SendMessage("Hello world!"); }