• TeamSpeak has reported a vulnerability in it's client that can potentially lead to RCE. A new version has been released that fixes it. So please update the client in your bot installation as soon as possible as well. Click here for more information.
  • 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