Onmessage function (evt) var data rse(evt.
Type: Function, parameters modules, modules which can be imported via require( module name ) engine engine, example const engine require engine engine.NetConnectCallback(error: string?) Type: Function Since:.9.16 Parameters dbConnectCallback If an error occured, exactly one parameter containing the error will be handed to the callback dbConnectCallback(error: string?) Type: Function Since: Parameters dbQueryCallback Gets called deutschland online casino deutsch with two parameters, err and result - both are mutually exclusive.Log(err if (dbc) dbc.Log got data String ) if (conn) conn.Log Hello from a script!'bar 'bar2 if (dbc) dbc.Db Since: Example var db require db var engine require engine var helpers require helpers var dbc nnect( driver: 'mysql host: username: 'demo password: 'blah database: 'foo', function(err) if (err) engine.Data ; Static Members db The database module is protected, it needs the following entry per script in your i: ivileges scriptname "db" Use additional parameters to exec / query whenever you use untrusted/unknown data, as those will automatically be escaped and avoid SQL injection.Log close evt alert Closed.On data function(x) engine.Write GET / http/1.1rnHost: localhostrnrn Static Members ws Websocket Server: The ws module is protected, it needs the following entry per script in your i: ivileges scriptname "ws" ws Since:.9.20 Example SinusBot script: var ws require ws var engine require engine var event require.
Client Instance Members Channel Channel Instance Members User User Instance Members Permission handles channel, channelgroup and servergroup permissions; mainly for TS3 Permission Since:.13.37 Instance Members ChannelGroup ChannelGroup Instance Members ServerGroup ServerGroup Instance Members Bytes Bytes Since:.9.16 Instance Members PlaylistTrack Track in a Playlist.
Onclose function (evt) console.Check out our guide in the.Data: id ' id data: ' String.This scripting-documentation lists all available modules and their methods implemented in the current SinusBot Scripting Engine.Static Members store store Example var store require store t foo 'bar Static Members backend backend Static Members media media Static Members audio audio Static Members format format Static Members helpers helpers Static Members event event Example var event require event var engine require engine.Log new websocket connection; id ' id oadcast(1, blubb: 'blubb' event.SinusBot Documentation for explanations on how to get started.'wss' : 'ws var conn new WebSocket(proto document.; ringify( type: 'ping' conn.There is also a documentation available for the command-library that was introduced with sinusbot-1.0.0-alpha.Location.host api/v1/b botId i instanceId ws conn.