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