Difference between revisions of "Bot Playground/Events/group offer"
From SmartBots Developers Docs
(Created page with "{{DISPLAYTITLE:group_offer}} <onlyinclude>Fires when bot receives a group invite</onlyinclude> {{API Event Table}} {{API Variable Group|Output}} {{API Variable|name}}The name...") |
|||
Line 18: | Line 18: | ||
}); | }); | ||
− | console.log("Bot is listening, | + | console.log("Bot is listening, group invites"); |
</syntaxhighlight> | </syntaxhighlight> | ||
{{NavMenu}} | {{NavMenu}} |
Revision as of 02:56, 1 July 2016
Fires when bot receives a group invite
Reference
This event comes with the following event object:
Variable | Required | Description | |
---|---|---|---|
Output: | |||
name | The name of the event in this case group_offer | ||
avatar_name | The name of the sender | ||
group_name | The name of the group | ||
group_uuid | The UUID of the group |
Example
Bot.on("group_offer", function(event) {
console.log(event.avatar_name + " invited me to group: \n" + event.group_name);
});
console.log("Bot is listening, group invites");