Difference between revisions of "TotalControl for LSL/Commands/BOT STATUS QUERY"

From SmartBots Developers Docs
Jump to: navigation, search
Line 9: Line 9:
  
 
{{AdminBot Required Vars|BOT_SETUP_SETBOT}}
 
{{AdminBot Required Vars|BOT_SETUP_SETBOT}}
{{API Variable|str|yes}} name of the Bot
+
{{API Variable|str|yes}} ---
{{API Variable|id|yes}} [http://www.mysmartbots.com/docs/Bot_access_code Access Code]
+
{{API Variable|id|yes}} ---
  
 
{{API Variables Table End}}
 
{{API Variables Table End}}
  
== Result ==
+
{{AdminBot Event after Command|BOT_STATUS_QUERY|BOT_EVENT_STATUS_REPLY}}
 
+
{{AdminBot Event after Command Entry|str}} first line - bot status code (see all codes [[AdminBot_for_Bots/Documentation/Status_Codes|here]])
One of the following events will be generated:
+
second line - bot expiration date
* [[AdminBot for Bots/Events/BOT_SETUP_SUCCESS|BOT_SETUP_SUCCESS]]
+
{{AdminBot Event after Command Entry|id}} Bot UUID
* [[AdminBot for Bots/Events/BOT_SETUP_FAILED|BOT_SETUP_FAILED]]
+
{{AdminBot Event after Command End}}
  
 
{{AdminBot for Bots Commands - standard footer}}
 
{{AdminBot for Bots Commands - standard footer}}

Revision as of 20:52, 6 July 2016

Queries the AdminBot-selected bot status (useful to determine the subscription length). Result is being returned using BOT_EVENT_STATUS_REPLY event

llMessageLinked(LINK_SET,BOT_STATUS_QUERY,"","");

Variables

The following table shows input values (you send them with the API call) and returned output values.

Variable Required Description


str yes ---
id yes ---

Return value

The result of this command will be returned to your script using BOT_STATUS_QUERY event:

link_message(integer sender, integer num, string str, key id) {
  ...
}

Where:

sender link number of a sender prim
num BOT_STATUS_QUERY
str first line - bot status code (see all codes here)

second line - bot expiration date

id Bot UUID