IsMod and IsAdmin?


#1

Hi,
i working on my own script (maybe i’ll post it at a later Point here).
Now i would like to know is there any Methode to check if a user is admin and/or mod like $.isFolower() ?

Thanks
Marco


#2

Yes, there are methods for such things:

$.isBot
$.isOwner
$.isCaster
$.isAdmin
$.isMod

And a bunch more found in permissions.js


#3

Hell yes thank you so mutch. Exactly wath i’m looking for. :sunglasses:


#4

Is there any Method to check if Name is/were online ?


#5

There’s a method to check if a stream is online, yes. I do not think there is one to check if a user is online.

$.isOnline(name) will return the status of name's stream. true = they’re streaming. false = they’re not.


#6

No I mean how can I check if the argument is an stream viewer.


#7

So you would like to check if a Name is in your Chat online?


#8

yep right that is what i want


#9

You can use $.userExists() for this. I post u some of my code below. Just as example. If you need more help let me know.

Marco

if(command.equalsIgnoreCase('test')){	
    	var arg = args[0];
    	$.consoleLn(arg);
    	var name = false;
    			
    	if(arg != undefined){
    		name = $.userExists(arg);
    	}
    			
    	if(name == true){
    		$.say('online');
    	}
    	else{
    		$.say('NOT online');
    	}
}