• We would like to invite you to check out the latest 1.0 alpha versions. You can read more about what's new here. Please note, that this is still an early release and will contain new bugs ¯\_(ツ)_/¯
  • If you need help or want to discuss things, you now can also join us on our Discord Server!

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...");
}

});
});
 

Similar threads

Top