diff --git a/discord/member.py b/discord/member.py index c3b848008..367d8de7d 100644 --- a/discord/member.py +++ b/discord/member.py @@ -548,6 +548,22 @@ class Member(discord.abc.Messageable, _UserTag): result.sort() return result + @property + def display_icon(self) -> Optional[Union[str, Asset]]: + """Optional[Union[:class:`str`, :class:`Asset`]]: A property that returns the role icon that is rendered for + this member. If no icon is shown then ``None`` is returned. + + .. versionadded:: 2.0 + """ + + roles = self.roles[1:] # remove @everyone + for role in reversed(roles): + icon = role.display_icon + if icon: + return icon + + return None + @property def mention(self) -> str: """:class:`str`: Returns a string that allows you to mention the member."""