Difference between revisions of "Bot Playground"
Line 21: | Line 21: | ||
Refer to [[Playground Examples]] page for more info. | Refer to [[Playground Examples]] page for more info. | ||
+ | |||
+ | == Limitations == | ||
+ | |||
+ | Yes, there are still some: | ||
+ | |||
+ | # '''Scripts stop when Bots Playground server gets restarted.''' This is just an early-stage limitation, it will be removed very soon. | ||
+ | # '''Bots "forget" the event handlers when bot server get restarted.''' Also the very early-stage limitation. | ||
+ | |||
+ | In few words: bot scripts do work, reliably start and stop. Just don't expect it to run for ''weeks'' yet. | ||
+ | |||
+ | == Safety == | ||
+ | |||
+ | ; Is my bot password safe? : Yes. We do not store bot and SmartBots account passwords on a sandbox server at all. | ||
+ | ; Can scripts read files? : No. The scripts are sandboxed and can't access world outside the sandbox. However, check the "Bug Hunter" program below. | ||
+ | ; Can I crash the server? : Yes, easily. Just write the script which starts a dead loop. During the beta test we don't track and kill such scripts (we will later). So... just act wisely. | ||
== Bug Hunter program == | == Bug Hunter program == | ||
− | Playground scripts run in their own sandboxes. Well, they are supposed to be sandboxes. | + | Playground scripts run in their own sandboxes. Well, they are supposed to be sandboxes... we appreciate if you report the security holes within [[Bot Playground/Bug Hunter program|Bug Hunter program]]. |
{{NavMenu}} | {{NavMenu}} |
Revision as of 19:56, 15 July 2016
SmartBots Bot Playground is a dedicated sandbox to run your own programs which control your bot. This section is still in development!
Language
Playground runs programs written JavaScript. The pure javascript: with callbacks, functions, arrays and objects. The underlying javascript engine is NodeJS (V8).
There are some limitations applied yet:
- We do not support ECMAScript 6
- import/export is not supported yet
- you can't include one script into another (yet)
Interacting with your bot
Your program sends commands to the bot. Events come from the bots to your program.
This two-way communication is tied directly into javascript program routines:
- bot commands are functions you call
- events are callback functions you specify
Refer to Playground Examples page for more info.
Limitations
Yes, there are still some:
- Scripts stop when Bots Playground server gets restarted. This is just an early-stage limitation, it will be removed very soon.
- Bots "forget" the event handlers when bot server get restarted. Also the very early-stage limitation.
In few words: bot scripts do work, reliably start and stop. Just don't expect it to run for weeks yet.
Safety
- Is my bot password safe?
- Yes. We do not store bot and SmartBots account passwords on a sandbox server at all.
- Can scripts read files?
- No. The scripts are sandboxed and can't access world outside the sandbox. However, check the "Bug Hunter" program below.
- Can I crash the server?
- Yes, easily. Just write the script which starts a dead loop. During the beta test we don't track and kill such scripts (we will later). So... just act wisely.
Bug Hunter program
Playground scripts run in their own sandboxes. Well, they are supposed to be sandboxes... we appreciate if you report the security holes within Bug Hunter program.