I wonder if you can help (I search it and nothing...) I am learning how to work with discord.js node and I want to change my user nickname (not the username itself)
like @Zaidhaan said, heres a little snippet that only trys to set the nickname if it has the perms
if (message.guild.members.get(bot.user.id).hasPermission("MANAGE_NICKNAMES") && message.guild.members.get(bot.user.id).hasPermission("CHANGE_NICKNAME")) {
message.guild.members.get(bot.user.id).setNickname("Nickname Here");
} else {
message.channel.sendMessage("I dont have the permissons to change my nickname in this server.");
}
since your getting the user via message.guild.members.get() it requires the perms to edit nicknames on the server