diff --git a/chat_exporter/construct/message.py b/chat_exporter/construct/message.py index 7f6e092..7c30ab4 100644 --- a/chat_exporter/construct/message.py +++ b/chat_exporter/construct/message.py @@ -253,8 +253,13 @@ async def _gather_user_colour(self, author: discord.Member): async def _gather_user_icon(self, author: discord.Member): member = await self._gather_member(author) - if member and member.display_icon: + if not member: + return "" + + if hasattr(member, "display_icon") and member.display_icon: return f"Role Icon" + elif hasattr(member, "top_role") and member.top_role and member.top_role.icon: + return f"Role Icon" return "" def set_time(self, message: Optional[discord.Message] = None):