Difference between revisions of "Bot Playground/Events/group offer"

From SmartBots Developers Docs
Jump to: navigation, search
 
Line 10: Line 10:
 
{{API Variable|name}}The name of the event in this case group_offer
 
{{API Variable|name}}The name of the event in this case group_offer
 
{{API Variable|avatar_name}}The name of the sender
 
{{API Variable|avatar_name}}The name of the sender
 +
{{API Variable|avatar_uuid}}Sender's UUID
 
{{API Variable|group_name}}The name of the group
 
{{API Variable|group_name}}The name of the group
 
{{API Variable|group_uuid}}The UUID of the group
 
{{API Variable|group_uuid}}The UUID of the group
 +
{{API Variable|session_id}}Session ID to accept invitation
 +
{{API Variable|system_message}}SL system message
  
 
{{API Variables Table End}}
 
{{API Variables Table End}}

Latest revision as of 18:57, 10 September 2022

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
event object properties:
name The name of the event in this case group_offer
avatar_name The name of the sender
avatar_uuid Sender's UUID
group_name The name of the group
group_uuid The UUID of the group
session_id Session ID to accept invitation
system_message SL system message

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");