Advertisement
AEAEAEAEarray

pubic and owner command

Aug 26th, 2021
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MPP.client.on('a', function(msg) {
  2.     var yourParticipant = MPP.client.getOwnParticipant(); //it show your own id, thats only you can use admin commands
  3.     var userId = msg.p._id; //its user id, that who will use admin command
  4.     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
  5.    
  6.    
  7.     //now listen carefully you have to use that != function for admin commads...................
  8.     //here is exmaple...............
  9.    
  10.     if (b == prefix + "js") { //it showing a example..................... just listen carefully.........
  11.         if (userId != yourId) return send("You dont have any permission this command"); //that is function to admins only.......
  12.         //now your js command or other admin command code bellow...........................
  13.     }
  14. });
  15.  
  16.  
  17. //listen carefully........................................
  18.  
  19. //if userid != youId means .. when user enter your id then he cant use that command..
  20. // thats means only ur id can use that... and other ids can't....................................
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement