Skip to content

Commit

Permalink
fix userinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
muricans committed Jun 23, 2019
1 parent 5310045 commit a00aee2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion commands/util/userinfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ function info(mention, message) {
.addField('ID', mention.id)
.addField('Time of Creation', mention.createdAt)
.setThumbnail(mention.displayAvatarURL());
if (message !== undefined)
if (message !== undefined) {
const member = message.guild.member(mention);
if (!member.roles.array().length || !member.roles.color || !member.roles.color.color) return embed;
embed.setColor(message.guild.member(mention).roles.color.color);
}
return embed;
}

0 comments on commit a00aee2

Please sign in to comment.