Difference between revisions of "Bot Playground/Commands/inviteGroup"

From SmartBots Developers Docs
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}}}} <onlyinclude>Sends a group invitation to a specific resident.</onlyinclude> <syntaxhighlight lang="javascript"> Bot.inviteGroup(location); </...")
 
 
Line 3: Line 3:
  
 
<syntaxhighlight lang="javascript">
 
<syntaxhighlight lang="javascript">
Bot.inviteGroup(location);
+
Bot.inviteGroup(avatar, groupuuid, roleuuid, check_membership);
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 20:43, 2 July 2016

Sends a group invitation to a specific resident.

Bot.inviteGroup(avatar, groupuuid, roleuuid, check_membership);

Reference

This command accepts the following parameters:

Variable Required Description


Input:
avatar yes The UUID of the resident
groupuuid yes The UUID of the group
roleuuid yes The UUID of the group role (NULL_KEY for "Everyone")
check_membership optional set to 1 if you want to ignore existing group members (see "Comments" below)
Output:
Function returns a Promise with the following data:
success bool true if command completed successfully
error string error string if command has failed

Comments

Ignoring existing group members

It is possible to ignore existing group members and do not invite them: set check_membership parameter to 1.

Important notice: bot reloads the list of the group members every 10 minutes. Thus, if resident (1) exits from the group and then (2) tries to join back immediately, bot will think that resident still in the group: the invitation will be discarded.