Browse Source

Fix checking if roles changed

master
Abheek Dhawan 4 years ago
parent
commit
6c6025d94a
  1. 4
      index.js

4
index.js

@ -955,10 +955,10 @@ client.on('guildMemberUpdate', (oldMember, newMember) => {
.setThumbnail(newMember.user.avatarURL())
.setTimestamp()
.setColor('e7778b');
if (removedRoles) {
if (removedRoles.array().length > 0) {
memberUpdateEmbed.addField("Roles Removed", removedRoles.map(r => `${r}`).join(' • '));
}
if (addedRoles) {
if (addedRoles.array().length > 0) {
memberUpdateEmbed.addField("Roles Added", addedRoles.map(r => `${r}`).join(' • '));
}
if (newMember.nickname !== oldMember.nickname) {

Loading…
Cancel
Save