From 64a1655ab9a171b8b19ee96e43966a66aaed2b4f Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Tue, 16 Mar 2021 17:18:18 -0500 Subject: [PATCH] Update setnick to a (mostly) working version --- commands/setnick.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/commands/setnick.js b/commands/setnick.js index 4445797..5aa41a6 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -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...",