manifest(Manifest)
The manifest determines which features are available to the script and
contains metadata and variables that will be shown in the web interface.

mainFunction(mainFunction)
If the script is activated this function is called when the scripts are loaded.
The function receives three parameters, the first one (
sinusbot
) is deprecated and should
not
be used anymore.

Manifest

author(string)
Your name and your email address in the form of:
your name <your-email@example.com>

description(string)
A longer description - tell the user what exactly your script does

version(string)
Start with something like 1.0 and increase it with every release

autorun(boolean?)
Set to true, if you want the script to be run on every instance, without the option to disable it.

backends(Array<string>?)
Per default scripts will only be available on TS3 instances.
If your script supports Discord (or in the future maybe other backends) as well, you have to specify this explicitly by setting this variable to an array containing all backends:
backends: ["ts3", "discord"]

enableWeb(boolean?)
If your script required own web content, you can set enableWeb to true and put files into the ./scripts/scriptname/html directory.
After restart, the script title will be clickable and lead to an index.html inside that html-directory you just created.

From there you have access to the localStorage variables containing the login and may communicate with the bot api from your own pages.

hidden(boolean?)
Hides the script from the settings page. Should be used together with autorun.

Hidden scripts can not have variables (vars), since they'd never be shown and thus not configurable.

requiredModules(Array<string>?)
Using this, you can define which restricted modules the script wants to use. If it's not allowed via the config, the script will not load at all but instead return an error on startup.
If you only optionally use features from restricted modules, don't use this but provide a fallback in your script.

vars(Array<object>?)
More information about the usage of variables can be found
here
.

voiceCommands(Array<string>?)
This parameter is only used for the speech recognition feature and may contain one or more strings that are to be detected for the given script.
You can find more details on how to use it here:
Speech Recognition

This event gets triggered whenever the bot recognizes a voice command that the script registered, assuming:
1) SpeechRecognition was installed
2) SpeechRecognition is enabled in the config.ini
3) The voice command was registered by the script in registerPlugin
4) AudioReturnChannel is set to 2

Check out the wiki article for more the complete list of reqirements and instructions on how to install it.

Returns the total number of connections from that client
On TS3, this information has to be actively requested from the server. If the bot is unable to get it or hasn't received an answer in time, it will return <= 0 here.

Returns the time the client has been created / was first seen by the server
On TS3, this information has to be actively requested from the server. If the bot is unable to get it or hasn't received an answer in time, it will return <= 0 here.