|
@ -971,15 +971,14 @@ client.on('guildMemberUpdate', (oldMember, newMember) => { |
|
|
.setColor('c9ff00'); |
|
|
.setColor('c9ff00'); |
|
|
if (removedRoles.array().length > 0) { |
|
|
if (removedRoles.array().length > 0) { |
|
|
memberUpdateEmbed.addField("Roles Removed", removedRoles.map(r => `${r}`).join(' • ')); |
|
|
memberUpdateEmbed.addField("Roles Removed", removedRoles.map(r => `${r}`).join(' • ')); |
|
|
} |
|
|
} else if (addedRoles.array().length > 0) { |
|
|
if (addedRoles.array().length > 0) { |
|
|
|
|
|
memberUpdateEmbed.addField("Roles Added", addedRoles.map(r => `${r}`).join(' • ')); |
|
|
memberUpdateEmbed.addField("Roles Added", addedRoles.map(r => `${r}`).join(' • ')); |
|
|
} |
|
|
} else if (newMember.nickname !== oldMember.nickname) { |
|
|
if (newMember.nickname !== oldMember.nickname) { |
|
|
|
|
|
memberUpdateEmbed.addField("Nickname Changed", `\`${oldMember.nickname}\` >> \`${newMember.nickname}\``) |
|
|
memberUpdateEmbed.addField("Nickname Changed", `\`${oldMember.nickname}\` >> \`${newMember.nickname}\``) |
|
|
} |
|
|
} else if (newMember.user.tag !== oldMember.user.tag) { |
|
|
if (newMember.user.tag !== oldMember.user.tag) { |
|
|
|
|
|
memberUpdateEmbed.addField("User Tag Changed", `\`${oldMember.user.tag}\` >> \`${newMember.user.tag}\``) |
|
|
memberUpdateEmbed.addField("User Tag Changed", `\`${oldMember.user.tag}\` >> \`${newMember.user.tag}\``) |
|
|
|
|
|
} else { |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
collection.findOne({ guild_id: newMember.guild.id }, (error, result) => { |
|
|
collection.findOne({ guild_id: newMember.guild.id }, (error, result) => { |
|
|
if (error) { |
|
|
if (error) { |
|
|