group_im

From SmartBots Developers Docs
Jump to: navigation, search

Fires when bot receives a group chat message.

Bot.on("group_im", function(event) { ... });

Reference

This event comes with the following event object:

Variable Required Description
event object properties:
name The name of the event in this case group_im
group_name The same of the group
group_uuid The UUUID of the group
speaker_name The name of the sender
speaker_uuid The UUID of the sender
message The text of the message

Example

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

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