function sendMessage(text) { $('#input').val(text); $('#sayit-button').click(); return text; } sendMessage("I'm talking from the JavaScript console!")
this.Text
MyChatbot.onmessage = function(){}
!!zlistcommands
else if(this.Text.slice(0, 2) == "!!z") { this.Reply("Unknown command"); }
!!zap
!!z
!!zhello zyabin101
Unknown command
var DICTIONARY = {"!!zhelp":"No help yet, but you can use !!zlistcommands.",/*etc*/}
var text = DICTIONARY[this.Text] if (text) {this.Reply(text); return 0;}
if(this.Text.slice(0, 3) !== "!!z") { return 0; }