Difference between revisions of "Bot Playground/Built-in Functions"
From SmartBots Developers Docs
m (Gg moved page Built-in Functions to Bot Playground/Built-in Functions) |
|||
Line 11: | Line 11: | ||
{{API_Group|Program flow}} | {{API_Group|Program flow}} | ||
− | |||
− | |||
{{API_Entry|HTTP Bot Command|exit}} | {{API_Entry|HTTP Bot Command|exit}} | ||
{{API_Entry|HTTP Bot Command|Timer control}} | {{API_Entry|HTTP Bot Command|Timer control}} | ||
+ | |||
+ | {{API_Group|Persistent storage}} | ||
+ | {{API_Entry|HTTP Bot Command|localStorage.get}} | ||
+ | {{API_Entry|HTTP Bot Command|localStorage.set}} | ||
+ | |||
+ | {{API_Group|Debug}} | ||
+ | {{API_Entry|HTTP Bot Command|console.log}} | ||
+ | {{API_Entry|HTTP Bot Command|console.error}} | ||
+ | |||
+ | |||
{{API_Table_end}} | {{API_Table_end}} | ||
Revision as of 14:49, 6 October 2016
The basic built-in functions do not relate to bot functionality. Instead, they allow writing flexible scripts.
setTimeout(function() { console.log("Timer has fired!"); }, 3000);
Commands reference
Command | Description | |
---|---|---|
Program flow | ||
exit | Bot Playground/Built-in Functions/exit | |
Timer control | Standard timer control routines of JavaScript: setTimeout, setInterval etc. | |
Persistent storage | ||
localStorage.get | Restores a string value from a persistent storage. | |
localStorage.set | Puts a string value into a persistent storage. | |
Debug | ||
console.log | Logs data to the runtime log. | |
console.error | Logs data to the error log.
|