chat_message

From SmartBots Developers Docs
Bot PlaygroundEvents
Revision as of 16:56, 30 June 2016 by Phil (Talk | contribs) (Created page with "{{DISPLAYTITLE:chat_message}} <onlyinclude>Fires when bot receives a message in the local chat</onlyinclude> {{API Event Table}} {{API Variable Group|Output}} {{API Variable|...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Fires when bot receives a message in the local chat

Reference

This event comes with the following event object:

Variable Required Description
Output:
message The text of the message

Example

Bot.on("chat_message", function(event) {
	console.log(event.speaker_name + " says: \n" + event.message);
});

console.log("Bot is listening, local chat");