Fix error in !info when the API tells us a user has a role that doesn't exist

This commit is contained in:
Dragory 2019-03-09 18:16:42 +02:00
parent 4b8e771d26
commit 7e9de889d4

View file

@ -433,7 +433,7 @@ export class UtilityPlugin extends ZeppelinPlugin<IBasePluginConfig, IUtilityPlu
largest: 2,
round: true,
});
const roles = member.roles.map(id => this.guild.roles.get(id));
const roles = member.roles.map(id => this.guild.roles.get(id)).filter(r => !!r);
embed.fields.push({
name: "Member information",