Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MPP.client.on('a', function(msg) {
- var yourParticipant = MPP.client.getOwnParticipant(); //it show your own id, thats only you can use admin commands
- var userId = msg.p._id; //its user id, that who will use admin command
- var yourId = yourParticipant._id; //your participant taken form var ur participant which one is first line.. it check that admin using admin command or others
- //now listen carefully you have to use that != function for admin commads...................
- //here is exmaple...............
- if (b == prefix + "js") { //it showing a example..................... just listen carefully.........
- if (userId != yourId) return send("You dont have any permission this command"); //that is function to admins only.......
- //now your js command or other admin command code bellow...........................
- }
- });
- //listen carefully........................................
- //if userid != youId means .. when user enter your id then he cant use that command..
- // thats means only ur id can use that... and other ids can't....................................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement