Fix setnick.js

yeah.. I fixed it? yaay!?
This commit is contained in:
TheCodingGuy 2021-03-19 00:50:30 -04:00 committed by GitHub
parent 37f45c6d06
commit 4935cf3d43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 42 deletions

View File

@ -1,9 +1,7 @@
const { GuildMember } = require("discord.js");
module.exports = {
name: 'setnick',
description: 'Sets your nickname',
execute(client, message, args, Discord) {
execute(client, message, args) {
if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) {
var newnick = args.slice(0).join(" ")
@ -29,6 +27,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.")
message.channel.send({ embed: successembed });
} catch (error) {
const failembed = {
"title": "<:AnitroxDenied:809651936642203668> Well that happened...",
@ -44,6 +43,7 @@ module.exports = {
}
]
};
message.channel.send({ failembed });
message.channel.send({ embed: failembed });
};
};
}}}