3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-16 14:11:50 +00:00

Fix default role showing up in user info embed

This commit is contained in:
Dragory 2021-08-20 21:02:16 +03:00
parent 7054412640
commit 7e179bb06c
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -101,9 +101,7 @@ export async function getUserInfoEmbed(
largest: 2, largest: 2,
round: true, round: true,
}); });
const roles = member.roles.cache const roles = Array.from(member.roles.cache.values()).filter(r => r.id !== pluginData.guild.id);
.map(role => pluginData.guild.roles.cache.get(role.id))
.filter((r): r is Role => !!r);
roles.sort(sorter("position", "DESC")); roles.sort(sorter("position", "DESC"));
embed.fields.push({ embed.fields.push({