CreeperTheBadCoder
CreeperTheBadCoder

Reputation: 1

Changing user nickname on join (discord.js)

I was advised to try with discord.js and it still doesn't work.

My code is:

client.on('guildMemberAdd', member => {
   guild.members.forEach(r => r.setNickname(nick + r.name));
});

If anyone would help me figure out why this doesn't work, I will appreciate it.

Upvotes: 0

Views: 258

Answers (1)

Internal
Internal

Reputation: 117

client.on('guildMemberAdd', member => {
  m.setNickname(r => r.username);
});

This Code sets the Nickname of a joined User to his Username. As much as i could understand this is what you want to Achive, right?

Upvotes: 1

Related Questions