Bot Playground/Store/User settings
From SmartBots Developers Docs
The most of scripts are supposed to be configurable for the user. The configurable options could be like group name, various messages and such.
Please note that user's bot name is not a setting. User selects the bot while purchasing your script.
Configuring settings
There are three values you specify:
- the setting variable name as your script sees it (see below)
- the setting "friendly" name as user sees it
- the optional hint for the user
All settings are string values (if you need a number or UUID you should do a transform in your script).
Accessing user settings from script
User setting can be accessed from your script using userSettings object:
console.log("Using group: " + userSettings.group_name);
Specifying settings while developing scripts
You can specify the settings values for your own script while in development:
New settings become available here as soon as you add them on "Bot Store > User settings" screen.
Asking user for settings
User sees the settings right after purchasing the script:
Settings and releases
When you develop your script the user settings