diff --git a/info/info.py b/info/info.py index ba1da86..dc700d0 100644 --- a/info/info.py +++ b/info/info.py @@ -507,11 +507,14 @@ class Info(commands.Cog): async def roleinfo(self, ctx, role: discord.Role, list_permissions: bool = False): """Gives information on a specific role. `list_permissions` is ignored if the role you're checking has the `Administrator` permission.""" - icon = role.display_icon - if isinstance(icon, discord.Asset): - icon_url = icon.url - elif isinstance(icon, str): - icon_url = await self.fetch_twemoji(unicode_emoji=icon) + try: + icon = role.display_icon + if isinstance(icon, discord.Asset): + icon_url = icon.url + elif isinstance(icon, str): + icon_url = await self.fetch_twemoji(unicode_emoji=icon) + except commands.CommandInvokeError: + icon_url = None permissions = role.permissions if role.color.value == 0: colorint = 10070709