Hey guys,
im still a noob in scripting ^^, but i tried to check if a user who sends a command to the bot is a member of a specific Servergroup:
Result:
When i send "!private" to the bot i only recieve the Test 1 message.
Yes the client im sending the message from is a member of the Servergroup that is needed.
Yes the bot hast the permissions to recieve the ServerGroups.
What's wrong about this code?
Is there a better way to deal with it?
im still a noob in scripting ^^, but i tried to check if a user who sends a command to the bot is a member of a specific Servergroup:
Code:
if(ev.msg.indexOf('!private') == 0){
chatPrivate(ev.clientId, 'Test 1 ' + groupid);
if(ev.clientServerGroups.indexOf(groupid) >= 0){
chatPrivate(ev.clientId, 'Test 2 ' + groupid);
}
}
When i send "!private" to the bot i only recieve the Test 1 message.
Yes the client im sending the message from is a member of the Servergroup that is needed.
Yes the bot hast the permissions to recieve the ServerGroups.
What's wrong about this code?
Is there a better way to deal with it?