• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

Search results

  1. r3flex

    EN Usage of ForEach Loop

    Now I have yet another problem, I do not have a clue how to check if the db entry already exists. I did this code but unfortunately it doesn't work as expected. if (dbc) dbc.query('SELECT * FROM czas WHERE uid = (?)', Uid, function(err, res) { if (!err) { var exists = res.forEach(function(row)...
  2. r3flex

    EN Usage of ForEach Loop

    I want to use client.getOnlineTime(). but also I have to run the script every x time again to update the DB right? I thought the sinus script runs on event and if there isn't an firing event e.g( event.on('client.move',) ) cuz that seems impractical for me, sometimes client dont actually that...
  3. r3flex

    EN Usage of ForEach Loop

    My main goal is to create TS3 DB Ranks, my main concept is to make the script refresh every x interval and add the time difference to the overall time spent in DB, then assign a server group to the client based on how many hrs he spent on srv.
  4. r3flex

    EN Usage of ForEach Loop

    It actually worked when I pressed save button, wierd but thats it, thanks :)
  5. r3flex

    EN Usage of ForEach Loop

    Wierd, thought my script would work when I start the sinusbot, just like it did when I set up simple DB insertions which actually worked.
  6. r3flex

    EN Usage of ForEach Loop

    Im just giving the raw example from official sinusbot docs, and yes I know I about the '. No output, it should say hello to my every client on ts3 but meanwhile it doesnt my full code is: registerPlugin({ name: 'DB Ranks', version: '2.0', description: 'This plugin will let the bot...
  7. r3flex

    EN Usage of ForEach Loop

    How do I implement the foreach iteration? I use the following code but unfortunately doesnt work, any ideas? <code> // Gets a list of all clients and sends them a message var backend = require('backend'); var clients = backend.getClients(); clients.forEach(function(client) {...
Top