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

From SmartBots Developers Docs
Jump to: navigation, search
 
Line 6: Line 6:
 
console.log("Status:", JSON.stringify(res, null, 2));
 
console.log("Status:", JSON.stringify(res, null, 2));
 
</syntaxhighlight>
 
</syntaxhighlight>
 
Note: the subsequent command calls may be cached for 60 seconds. [[/status|status]] command provides a slightly faster response rate.
 
  
 
{{API Command Table}}
 
{{API Command Table}}
Line 19: Line 17:
  
 
{{API Variables Table End}}
 
{{API Variables Table End}}
 +
 +
== Important notes ==
 +
 +
The subsequent command calls may be cached for up to 60 seconds. Use [[/status|status]] command to get a faster refresh rate.
 +
  
 
== Details ==
 
== Details ==

Latest revision as of 14:46, 12 February 2025

Returns the online status of the bot.

const res = await Bot.statusExt();
console.log("Status:", JSON.stringify(res, null, 2));

Reference

This command accepts the following parameters:

Variable Required Description


Input:
Output:
Function returns a Promise with the following data:
success bool true if command completed successfully
error string error string if command has failed
status An object which contains various information about bot status. See Details below.

Important notes

The subsequent command calls may be cached for up to 60 seconds. Use status command to get a faster refresh rate.


Details

The 'status' field of the response provides a lot of information on bot status:

{
	// Bot name
	"name": "Fashion Firethorn",
	// Bot UUID
	"UUID": "fc417c00-71ae-4427-a9dd-eed32a3e49de"

	// = Connection status
	// Is bot online
	"online": true,
	// Is bot connecting to Second Life right now
	"connecting": false,

	// In-world status
	// Avatar position
	"position": {
		"Z": 33.377563,
		"X": 234.81233,
		"Y": 111.23107
	},
	// Avatar heading (the view direction), radians
	"heading": -3.0020456,

	// Current region (sim) name
	"regionName": "DuoLife",
	// Current region ID
	"regionHandle": 849922488517376,
	// Current parcel name
	"parcelName": "SmartBots: Second Life bots for L$79 / Inviter bot + notices",
	// Current parcel ID
	"parcelID": 150,

	// Bot OS version
	"version": "91.00.00"
}