Update setnick to a (mostly) working version
This commit is contained in:
parent
75fe3064ab
commit
64a1655ab9
|
@ -4,8 +4,10 @@ module.exports = {
|
|||
name: 'setnick',
|
||||
description: 'Sets your nickname',
|
||||
execute(client, message, args, Discord) {
|
||||
|
||||
if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) {
|
||||
var newnick = args.slice(0).join(" ")
|
||||
|
||||
const successembed = {
|
||||
"title": "<:AnitroxSuccess:809651936819019796> Nickname Changed",
|
||||
"color": 9442302,
|
||||
|
@ -18,11 +20,6 @@ module.exports = {
|
|||
"name": "Changed nickname successfully!",
|
||||
"value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!"
|
||||
},
|
||||
{
|
||||
"name": "Old Nickname",
|
||||
"value": "oldnick",
|
||||
"inline": true
|
||||
},
|
||||
{
|
||||
"name": "New Nickname",
|
||||
"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 {
|
||||
const failembed = {
|
||||
"title": "<:AnitroxDenied:809651936642203668> Well that happened...",
|
||||
|
|
Reference in New Issue