From 3510b4d61f8a5d86e1ca03a635cf4370b035d9d2 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sat, 3 Apr 2021 23:39:00 -0500 Subject: [PATCH] Make sure to specify newMember or oldMember instead of just using member --- index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 60f4956..51bf217 100644 --- a/index.js +++ b/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 memberUpdateEmbed = new Discord.MessageEmbed() .setTitle("Member Updated") - .setAuthor(member.user.tag, member.user.avatarURL()) - .addField("Tag", `${member.user.tag}`) - .setFooter("Member ID: " + member.id) - .setThumbnail(member.user.avatarURL()) + .setAuthor(newMember.user.tag, newMember.user.avatarURL()) + .setFooter("Member ID: " + newMember.id) + .setThumbnail(newMember.user.avatarURL()) .setTimestamp() .setColor('e7778b'); if (removedRoles) {