Difference between revisions of "Bot Playground/Events/group offer"
From SmartBots Developers Docs
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:group_offer}} | {{DISPLAYTITLE:group_offer}} | ||
<onlyinclude>Fires when bot receives a group invite</onlyinclude> | <onlyinclude>Fires when bot receives a group invite</onlyinclude> | ||
| + | |||
| + | <syntaxhighlight lang="javascript"> | ||
| + | Bot.on("group_offer", function(event) { ... }); | ||
| + | </syntaxhighlight> | ||
{{API Event Table}} | {{API Event Table}} | ||
Revision as of 12:35, 1 July 2016
Fires when bot receives a group invite
Bot.on("group_offer", function(event) { ... });
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");