...

From SmartBots Developers Docs
Bot PlaygroundEvents
Revision as of 16:24, 6 October 2022 by NealB (Talk | contribs) (Created page with "{{DISPLAYTITLE:...}} <onlyinclude>Fires when bot receives a group notice.</onlyinclude> <syntaxhighlight lang="javascript"> Bot.on("group_notice", function(event) { ... }); <...")

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

Fires when bot receives a group notice.

Bot.on("group_notice", 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_notice
group_name The name of the group
group_uuid The UUUID of the group
speaker_name The name of the sender
speaker_uuid The UUID of the sender
subject The subject of the notice
message The message of the notice
attachment The attachment type of the notice
bot_slname The name of the bot receiving the notice


Example

Bot.on("group_notice", function(event) {
  console.log(event.group_name + ": " + event.speaker_name +" sent notice: \n message: " + event.message + "\n subject" + event.subject);
});

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