Update setnick to a (mostly) working version
This commit is contained in:
parent
75fe3064ab
commit
64a1655ab9
|
@ -4,8 +4,10 @@ module.exports = {
|
||||||
name: 'setnick',
|
name: 'setnick',
|
||||||
description: 'Sets your nickname',
|
description: 'Sets your nickname',
|
||||||
execute(client, message, args, Discord) {
|
execute(client, message, args, Discord) {
|
||||||
|
|
||||||
if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) {
|
if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) {
|
||||||
var newnick = args.slice(0).join(" ")
|
var newnick = args.slice(0).join(" ")
|
||||||
|
|
||||||
const successembed = {
|
const successembed = {
|
||||||
"title": "<:AnitroxSuccess:809651936819019796> Nickname Changed",
|
"title": "<:AnitroxSuccess:809651936819019796> Nickname Changed",
|
||||||
"color": 9442302,
|
"color": 9442302,
|
||||||
|
@ -18,11 +20,6 @@ module.exports = {
|
||||||
"name": "Changed nickname successfully!",
|
"name": "Changed nickname successfully!",
|
||||||
"value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!"
|
"value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Old Nickname",
|
|
||||||
"value": "oldnick",
|
|
||||||
"inline": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "New Nickname",
|
"name": "New Nickname",
|
||||||
"value": newnick,
|
"value": newnick,
|
||||||
|
@ -30,7 +27,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
GuildMember.setNickname(newnick, "Nickname change requested by a server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.")
|
message.member.setNickname(newnick, "Nickname change requested by the server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.")
|
||||||
} else {
|
} else {
|
||||||
const failembed = {
|
const failembed = {
|
||||||
"title": "<:AnitroxDenied:809651936642203668> Well that happened...",
|
"title": "<:AnitroxDenied:809651936642203668> Well that happened...",
|
||||||
|
|
Reference in New Issue