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

EN Reply if server group is x

ddb2702

Member
Hello there,

I am trying to make my script only reply if the server group ID of the user sending the message is equal to 189 and I am struggling to do so. At the moment i have the following code, any help is appreciated thanks!

registerPlugin({
name: 'Script',
version: '1.0',
description: 'This script will do your',
author: 'ggg <hh>',
vars: [],
}, function(sinusbot, config) {
var event = require('event');
var backend = require('backend');
event.on('chat', function(ev) {
if(ev.client.getServerGroup().id() == 189){
ev.client.chat("YOU ARE AN MEMBER");
}
if(ev.text == '!start') {
ev.client.chat("Starting...");
}

});
});
 
Top