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