Browse Source

Make sure to specify newMember or oldMember instead of just using member

master
Abheek Dhawan 4 years ago
parent
commit
3510b4d61f
  1. 7
      index.js

7
index.js

@ -950,10 +950,9 @@ client.on('guildMemberUpdate', (oldMember, newMember) => {
const addedRoles = newMember.roles.cache.filter(role => !oldMember.roles.cache.has(role.id)); const addedRoles = newMember.roles.cache.filter(role => !oldMember.roles.cache.has(role.id));
const memberUpdateEmbed = new Discord.MessageEmbed() const memberUpdateEmbed = new Discord.MessageEmbed()
.setTitle("Member Updated") .setTitle("Member Updated")
.setAuthor(member.user.tag, member.user.avatarURL()) .setAuthor(newMember.user.tag, newMember.user.avatarURL())
.addField("Tag", `${member.user.tag}`) .setFooter("Member ID: " + newMember.id)
.setFooter("Member ID: " + member.id) .setThumbnail(newMember.user.avatarURL())
.setThumbnail(member.user.avatarURL())
.setTimestamp() .setTimestamp()
.setColor('e7778b'); .setColor('e7778b');
if (removedRoles) { if (removedRoles) {

Loading…
Cancel
Save