-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnick.js
32 lines (31 loc) · 1.13 KB
/
nick.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module.exports.run = async (Tag, msg, args) => {
if (msg.author.id === "391736039879999489") {
const person = msg.mentions.members.first();
const changed = args.slice(1).join(' ');
console.log(`${person} , ${person.user.id}, ${person.user.username}, ${person.user.tag}`)
if (msg.member.hasPermission(['MANAGE_MESSAGES'])) {
if (person.user.id == '391750832422518795' && msg.author.id !== '391736039879999489') {
msg.delete();
msg.channel.send('Nice try :wink:')
return;
}
if (!changed) {
person.setNickname('')
console.log(`Reset nickname for ${person}`)
msg.delete();
} else {
person.setNickname(changed);
console.log(`Set ${person.user.username}'s nickname to ${changed}`);
msg.delete();
}
}
} else return
}
module.exports.help = {
name: 'nick',
description: 'Sets a users nickname',
usage: 'nick @person nickname'
}
module.exports.conf = {
aliases: ['n']
}