Advertisement
AEAEAEAEarray

mpp name change command

Aug 26th, 2021
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (b ==prefix + "cn") { //dont change that cn to change name or other
  2.     const send = MPP.chat.send;
  3.     let own = MPP.client.getOwnParticipant();
  4.     let yourid = own._id;
  5.     let userid = msg.p._id;
  6.     if (userid != yourid) return send("You dont have any permission to use this command");
  7.     let prefix = "&";
  8.     let userinput = msg.a.substring(5);
  9.     let username = msg.p.name;
  10.     if (userinput == "") return send(`${username} please enter name to change name, usage: ${prefix}cn [newname]`);
  11.     MPP.client.sendArray([{m: "userset",set: {name: userinput}}]);
  12.     send(`${username} changed his name to ${userinput}`);
  13. }
  14.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement