Difference between revisions of "Bot Playground/Commands/acceptGroupOffer"
From SmartBots Developers Docs
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:{{SUBPAGENAME}}}} | {{DISPLAYTITLE:{{SUBPAGENAME}}}} | ||
− | <onlyinclude>Accept (or reject) | + | <onlyinclude>Accept (or reject) a group invitation sent by other avatar.</onlyinclude> |
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
Bot.on("group_offer", (event) => { | Bot.on("group_offer", (event) => { | ||
− | Bot. | + | Bot.acceptGroupOffer(event.avatar_uuid, event.session_id, true); |
}); | }); | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 17:40, 15 October 2022
Accept (or reject) a group invitation sent by other avatar.
Bot.on("group_offer", (event) => {
Bot.acceptGroupOffer(event.avatar_uuid, event.session_id, true);
});
See group_offer event for details.
Reference
This command accepts the following parameters:
Variable | Required | Description
| |
---|---|---|---|
Input: | |||
avatar_uuid | yes | sender avatar UUID | |
session_id | yes | session UUID from the event | |
accept | yes | true to accept invitation, false to reject. | |
Output: | |||
Function returns a Promise with the following data: | |||
success | bool | true if command completed successfully | |
error | string | error string if command has failed |