From 37f45c6d0677c3a1a08f66dff023b9a3d210663d Mon Sep 17 00:00:00 2001 From: Anthony M <47640864+IDeletedSystem64@users.noreply.github.com> Date: Tue, 16 Mar 2021 17:50:29 -0500 Subject: [PATCH] Update setnick --- commands/setnick.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/setnick.js b/commands/setnick.js index 5aa41a6..dc83b26 100644 --- a/commands/setnick.js +++ b/commands/setnick.js @@ -8,6 +8,7 @@ module.exports = { if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) { var newnick = args.slice(0).join(" ") + try { const successembed = { "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", "color": 9442302, @@ -28,7 +29,7 @@ module.exports = { ] }; 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 { + } catch (error) { const failembed = { "title": "<:AnitroxDenied:809651936642203668> Well that happened...", "color": 13632027, @@ -45,4 +46,4 @@ module.exports = { }; message.channel.send({ failembed }); }; -}} \ No newline at end of file +}}} \ No newline at end of file