• 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.

DE getServerGroups

Status
Not open for further replies.

Tunakill

Well-Known Member
Contributor
Insider
In der 0.9.16 unter Linux und Windows gibt die Funktion 'getServerGroups' nur ein leeres Array zurück.
Gibt es eine andere Möglichkeit die Servergruppen eines Clients abzufragen?
Oder habe ich etwas in meinem Code falsch?
Code:
Code:
  var engine = require('engine');
  var event = require('event');

  event.on('clientMove', function(ev) {
   
    engine.log('clientMove');
   
    var groups = ev.client.getServerGroups();
    engine.log(groups);
   
    groups.forEach(function(user_servergroup) {
      engine.log('____');
      engine.log(user_servergroup.id() + ' S_iD');
   
    });

  });
 
  event.on('chat', function(ev) {
   
    engine.log('chat');
   
    var groups = ev.client.getServerGroups();
    engine.log(groups);
   
    groups.forEach(function(user_servergroup) {
      engine.log('____');
      engine.log(user_servergroup.id() + ' S_iD');
   
    });
     
  });

LOG:
test33    :27   clientMove
test33    :30   []
PRIVATE-CHAT [Tuna] Hallo
test33    :44   chat
test33    :47   []
 
Status
Not open for further replies.
Top