We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Implement a !role command
Currently, we have a `!roles` command, which lists out all the roles. However, it would also be useful to have a `!role <role>` command, to get more info on a certain role.

**Implementation details**
- Ability to get info on multiple roles? `!role <role_1> <role_2>`
- Info that would be helpful:
    - Role ID
    - Role Name
    - Role Color as hex/hsv
    - Is role mentionable
    - Number of members with the role? (Blacklist certain high volume, easily checked ones like `@Developers`)
- Restrict to core developers and moderator+


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `bot/cogs/information.py`
Content:
```
1 import logging
2 import textwrap
3 
4 from discord import CategoryChannel, Colour, Embed, Member, TextChannel, VoiceChannel
5 from discord.ext.commands import Bot, Cog, Context, command
6 
7 from bot.constants import Channels, Emojis, MODERATION_ROLES, STAFF_ROLES
8 from bot.decorators import InChannelCheckFailure, with_role
9 from bot.utils.checks import with_role_check
10 from bot.utils.time import time_since
11 
12 log = logging.getLogger(__name__)
13 
14 
15 class Information(Cog):
16     """A cog with commands for generating embeds with server info, such as server stats and user info."""
17 
18     def __init__(self, bot: Bot):
19         self.bot = bot
20 
21     @with_role(*MODERATION_ROLES)
22     @command(name="roles")
23     async def roles_info(self, ctx: Context) -> None:
24         """Returns a list of all roles and their corresponding IDs."""
25         # Sort the roles alphabetically and remove the @everyone role
26         roles = sorted(ctx.guild.roles, key=lambda role: role.name)
27         roles = [role for role in roles if role.name != "@everyone"]
28 
29         # Build a string
30         role_string = ""
31         for role in roles:
32             role_string += f"`{role.id}` - {role.mention}\n"
33 
34         # Build an embed
35         embed = Embed(
36             title="Role information",
37             colour=Colour.blurple(),
38             description=role_string
39         )
40 
41         embed.set_footer(text=f"Total roles: {len(roles)}")
42 
43         await ctx.send(embed=embed)
44 
45     @command(name="server", aliases=["server_info", "guild", "guild_info"])
46     async def server_info(self, ctx: Context) -> None:
47         """Returns an embed full of server information."""
48         created = time_since(ctx.guild.created_at, precision="days")
49         features = ", ".join(ctx.guild.features)
50         region = ctx.guild.region
51 
52         # How many of each type of channel?
53         roles = len(ctx.guild.roles)
54         channels = ctx.guild.channels
55         text_channels = 0
56         category_channels = 0
57         voice_channels = 0
58         for channel in channels:
59             if type(channel) == TextChannel:
60                 text_channels += 1
61             elif type(channel) == CategoryChannel:
62                 category_channels += 1
63             elif type(channel) == VoiceChannel:
64                 voice_channels += 1
65 
66         # How many of each user status?
67         member_count = ctx.guild.member_count
68         members = ctx.guild.members
69         online = 0
70         dnd = 0
71         idle = 0
72         offline = 0
73         for member in members:
74             if str(member.status) == "online":
75                 online += 1
76             elif str(member.status) == "offline":
77                 offline += 1
78             elif str(member.status) == "idle":
79                 idle += 1
80             elif str(member.status) == "dnd":
81                 dnd += 1
82 
83         embed = Embed(
84             colour=Colour.blurple(),
85             description=textwrap.dedent(f"""
86                 **Server information**
87                 Created: {created}
88                 Voice region: {region}
89                 Features: {features}
90 
91                 **Counts**
92                 Members: {member_count:,}
93                 Roles: {roles}
94                 Text: {text_channels}
95                 Voice: {voice_channels}
96                 Channel categories: {category_channels}
97 
98                 **Members**
99                 {Emojis.status_online} {online}
100                 {Emojis.status_idle} {idle}
101                 {Emojis.status_dnd} {dnd}
102                 {Emojis.status_offline} {offline}
103             """)
104         )
105 
106         embed.set_thumbnail(url=ctx.guild.icon_url)
107 
108         await ctx.send(embed=embed)
109 
110     @command(name="user", aliases=["user_info", "member", "member_info"])
111     async def user_info(self, ctx: Context, user: Member = None, hidden: bool = False) -> None:
112         """Returns info about a user."""
113         if user is None:
114             user = ctx.author
115 
116         # Do a role check if this is being executed on someone other than the caller
117         if user != ctx.author and not with_role_check(ctx, *MODERATION_ROLES):
118             await ctx.send("You may not use this command on users other than yourself.")
119             return
120 
121         # Non-moderators may only do this in #bot-commands and can't see hidden infractions.
122         if not with_role_check(ctx, *STAFF_ROLES):
123             if not ctx.channel.id == Channels.bot:
124                 raise InChannelCheckFailure(Channels.bot)
125             # Hide hidden infractions for users without a moderation role
126             hidden = False
127 
128         # User information
129         created = time_since(user.created_at, max_units=3)
130 
131         name = str(user)
132         if user.nick:
133             name = f"{user.nick} ({name})"
134 
135         # Member information
136         joined = time_since(user.joined_at, precision="days")
137 
138         # You're welcome, Volcyyyyyyyyyyyyyyyy
139         roles = ", ".join(role.mention for role in user.roles if role.name != "@everyone")
140 
141         # Infractions
142         infractions = await self.bot.api_client.get(
143             'bot/infractions',
144             params={
145                 'hidden': str(hidden),
146                 'user__id': str(user.id)
147             }
148         )
149 
150         infr_total = 0
151         infr_active = 0
152 
153         # At least it's readable.
154         for infr in infractions:
155             if infr["active"]:
156                 infr_active += 1
157 
158             infr_total += 1
159 
160         # Let's build the embed now
161         embed = Embed(
162             title=name,
163             description=textwrap.dedent(f"""
164                 **User Information**
165                 Created: {created}
166                 Profile: {user.mention}
167                 ID: {user.id}
168 
169                 **Member Information**
170                 Joined: {joined}
171                 Roles: {roles or None}
172 
173                 **Infractions**
174                 Total: {infr_total}
175                 Active: {infr_active}
176             """)
177         )
178 
179         embed.set_thumbnail(url=user.avatar_url_as(format="png"))
180         embed.colour = user.top_role.colour if roles else Colour.blurple()
181 
182         await ctx.send(embed=embed)
183 
184 
185 def setup(bot: Bot) -> None:
186     """Information cog load."""
187     bot.add_cog(Information(bot))
188     log.info("Cog loaded: Information")
189
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/bot/cogs/information.py b/bot/cogs/information.py
--- a/bot/cogs/information.py
+++ b/bot/cogs/information.py
@@ -1,7 +1,9 @@
+import colorsys
 import logging
 import textwrap
+import typing
 
-from discord import CategoryChannel, Colour, Embed, Member, TextChannel, VoiceChannel
+from discord import CategoryChannel, Colour, Embed, Member, Role, TextChannel, VoiceChannel, utils
 from discord.ext.commands import Bot, Cog, Context, command
 
 from bot.constants import Channels, Emojis, MODERATION_ROLES, STAFF_ROLES
@@ -42,6 +44,52 @@
 
         await ctx.send(embed=embed)
 
+    @with_role(*MODERATION_ROLES)
+    @command(name="role")
+    async def role_info(self, ctx: Context, *roles: typing.Union[Role, str]) -> None:
+        """
+        Return information on a role or list of roles.
+
+        To specify multiple roles just add to the arguments, delimit roles with spaces in them using quotation marks.
+        """
+        parsed_roles = []
+
+        for role_name in roles:
+            if isinstance(role_name, Role):
+                # Role conversion has already succeeded
+                parsed_roles.append(role_name)
+                continue
+
+            role = utils.find(lambda r: r.name.lower() == role_name.lower(), ctx.guild.roles)
+
+            if not role:
+                await ctx.send(f":x: Could not convert `{role_name}` to a role")
+                continue
+
+            parsed_roles.append(role)
+
+        for role in parsed_roles:
+            embed = Embed(
+                title=f"{role.name} info",
+                colour=role.colour,
+            )
+
+            embed.add_field(name="ID", value=role.id, inline=True)
+
+            embed.add_field(name="Colour (RGB)", value=f"#{role.colour.value:0>6x}", inline=True)
+
+            h, s, v = colorsys.rgb_to_hsv(*role.colour.to_rgb())
+
+            embed.add_field(name="Colour (HSV)", value=f"{h:.2f} {s:.2f} {v}", inline=True)
+
+            embed.add_field(name="Member count", value=len(role.members), inline=True)
+
+            embed.add_field(name="Position", value=role.position)
+
+            embed.add_field(name="Permission code", value=role.permissions.value, inline=True)
+
+            await ctx.send(embed=embed)
+
     @command(name="server", aliases=["server_info", "guild", "guild_info"])
     async def server_info(self, ctx: Context) -> None:
         """Returns an embed full of server information."""

{"golden_diff": "diff --git a/bot/cogs/information.py b/bot/cogs/information.py\n--- a/bot/cogs/information.py\n+++ b/bot/cogs/information.py\n@@ -1,7 +1,9 @@\n+import colorsys\n import logging\n import textwrap\n+import typing\n \n-from discord import CategoryChannel, Colour, Embed, Member, TextChannel, VoiceChannel\n+from discord import CategoryChannel, Colour, Embed, Member, Role, TextChannel, VoiceChannel, utils\n from discord.ext.commands import Bot, Cog, Context, command\n \n from bot.constants import Channels, Emojis, MODERATION_ROLES, STAFF_ROLES\n@@ -42,6 +44,52 @@\n \n         await ctx.send(embed=embed)\n \n+    @with_role(*MODERATION_ROLES)\n+    @command(name=\"role\")\n+    async def role_info(self, ctx: Context, *roles: typing.Union[Role, str]) -> None:\n+        \"\"\"\n+        Return information on a role or list of roles.\n+\n+        To specify multiple roles just add to the arguments, delimit roles with spaces in them using quotation marks.\n+        \"\"\"\n+        parsed_roles = []\n+\n+        for role_name in roles:\n+            if isinstance(role_name, Role):\n+                # Role conversion has already succeeded\n+                parsed_roles.append(role_name)\n+                continue\n+\n+            role = utils.find(lambda r: r.name.lower() == role_name.lower(), ctx.guild.roles)\n+\n+            if not role:\n+                await ctx.send(f\":x: Could not convert `{role_name}` to a role\")\n+                continue\n+\n+            parsed_roles.append(role)\n+\n+        for role in parsed_roles:\n+            embed = Embed(\n+                title=f\"{role.name} info\",\n+                colour=role.colour,\n+            )\n+\n+            embed.add_field(name=\"ID\", value=role.id, inline=True)\n+\n+            embed.add_field(name=\"Colour (RGB)\", value=f\"#{role.colour.value:0>6x}\", inline=True)\n+\n+            h, s, v = colorsys.rgb_to_hsv(*role.colour.to_rgb())\n+\n+            embed.add_field(name=\"Colour (HSV)\", value=f\"{h:.2f} {s:.2f} {v}\", inline=True)\n+\n+            embed.add_field(name=\"Member count\", value=len(role.members), inline=True)\n+\n+            embed.add_field(name=\"Position\", value=role.position)\n+\n+            embed.add_field(name=\"Permission code\", value=role.permissions.value, inline=True)\n+\n+            await ctx.send(embed=embed)\n+\n     @command(name=\"server\", aliases=[\"server_info\", \"guild\", \"guild_info\"])\n     async def server_info(self, ctx: Context) -> None:\n         \"\"\"Returns an embed full of server information.\"\"\"\n", "issue": "Implement a !role command\nCurrently, we have a `!roles` command, which lists out all the roles. However, it would also be useful to have a `!role <role>` command, to get more info on a certain role.\r\n\r\n**Implementation details**\r\n- Ability to get info on multiple roles? `!role <role_1> <role_2>`\r\n- Info that would be helpful:\r\n    - Role ID\r\n    - Role Name\r\n    - Role Color as hex/hsv\r\n    - Is role mentionable\r\n    - Number of members with the role? (Blacklist certain high volume, easily checked ones like `@Developers`)\r\n- Restrict to core developers and moderator+\r\n\n", "before_files": [{"content": "import logging\nimport textwrap\n\nfrom discord import CategoryChannel, Colour, Embed, Member, TextChannel, VoiceChannel\nfrom discord.ext.commands import Bot, Cog, Context, command\n\nfrom bot.constants import Channels, Emojis, MODERATION_ROLES, STAFF_ROLES\nfrom bot.decorators import InChannelCheckFailure, with_role\nfrom bot.utils.checks import with_role_check\nfrom bot.utils.time import time_since\n\nlog = logging.getLogger(__name__)\n\n\nclass Information(Cog):\n    \"\"\"A cog with commands for generating embeds with server info, such as server stats and user info.\"\"\"\n\n    def __init__(self, bot: Bot):\n        self.bot = bot\n\n    @with_role(*MODERATION_ROLES)\n    @command(name=\"roles\")\n    async def roles_info(self, ctx: Context) -> None:\n        \"\"\"Returns a list of all roles and their corresponding IDs.\"\"\"\n        # Sort the roles alphabetically and remove the @everyone role\n        roles = sorted(ctx.guild.roles, key=lambda role: role.name)\n        roles = [role for role in roles if role.name != \"@everyone\"]\n\n        # Build a string\n        role_string = \"\"\n        for role in roles:\n            role_string += f\"`{role.id}` - {role.mention}\\n\"\n\n        # Build an embed\n        embed = Embed(\n            title=\"Role information\",\n            colour=Colour.blurple(),\n            description=role_string\n        )\n\n        embed.set_footer(text=f\"Total roles: {len(roles)}\")\n\n        await ctx.send(embed=embed)\n\n    @command(name=\"server\", aliases=[\"server_info\", \"guild\", \"guild_info\"])\n    async def server_info(self, ctx: Context) -> None:\n        \"\"\"Returns an embed full of server information.\"\"\"\n        created = time_since(ctx.guild.created_at, precision=\"days\")\n        features = \", \".join(ctx.guild.features)\n        region = ctx.guild.region\n\n        # How many of each type of channel?\n        roles = len(ctx.guild.roles)\n        channels = ctx.guild.channels\n        text_channels = 0\n        category_channels = 0\n        voice_channels = 0\n        for channel in channels:\n            if type(channel) == TextChannel:\n                text_channels += 1\n            elif type(channel) == CategoryChannel:\n                category_channels += 1\n            elif type(channel) == VoiceChannel:\n                voice_channels += 1\n\n        # How many of each user status?\n        member_count = ctx.guild.member_count\n        members = ctx.guild.members\n        online = 0\n        dnd = 0\n        idle = 0\n        offline = 0\n        for member in members:\n            if str(member.status) == \"online\":\n                online += 1\n            elif str(member.status) == \"offline\":\n                offline += 1\n            elif str(member.status) == \"idle\":\n                idle += 1\n            elif str(member.status) == \"dnd\":\n                dnd += 1\n\n        embed = Embed(\n            colour=Colour.blurple(),\n            description=textwrap.dedent(f\"\"\"\n                **Server information**\n                Created: {created}\n                Voice region: {region}\n                Features: {features}\n\n                **Counts**\n                Members: {member_count:,}\n                Roles: {roles}\n                Text: {text_channels}\n                Voice: {voice_channels}\n                Channel categories: {category_channels}\n\n                **Members**\n                {Emojis.status_online} {online}\n                {Emojis.status_idle} {idle}\n                {Emojis.status_dnd} {dnd}\n                {Emojis.status_offline} {offline}\n            \"\"\")\n        )\n\n        embed.set_thumbnail(url=ctx.guild.icon_url)\n\n        await ctx.send(embed=embed)\n\n    @command(name=\"user\", aliases=[\"user_info\", \"member\", \"member_info\"])\n    async def user_info(self, ctx: Context, user: Member = None, hidden: bool = False) -> None:\n        \"\"\"Returns info about a user.\"\"\"\n        if user is None:\n            user = ctx.author\n\n        # Do a role check if this is being executed on someone other than the caller\n        if user != ctx.author and not with_role_check(ctx, *MODERATION_ROLES):\n            await ctx.send(\"You may not use this command on users other than yourself.\")\n            return\n\n        # Non-moderators may only do this in #bot-commands and can't see hidden infractions.\n        if not with_role_check(ctx, *STAFF_ROLES):\n            if not ctx.channel.id == Channels.bot:\n                raise InChannelCheckFailure(Channels.bot)\n            # Hide hidden infractions for users without a moderation role\n            hidden = False\n\n        # User information\n        created = time_since(user.created_at, max_units=3)\n\n        name = str(user)\n        if user.nick:\n            name = f\"{user.nick} ({name})\"\n\n        # Member information\n        joined = time_since(user.joined_at, precision=\"days\")\n\n        # You're welcome, Volcyyyyyyyyyyyyyyyy\n        roles = \", \".join(role.mention for role in user.roles if role.name != \"@everyone\")\n\n        # Infractions\n        infractions = await self.bot.api_client.get(\n            'bot/infractions',\n            params={\n                'hidden': str(hidden),\n                'user__id': str(user.id)\n            }\n        )\n\n        infr_total = 0\n        infr_active = 0\n\n        # At least it's readable.\n        for infr in infractions:\n            if infr[\"active\"]:\n                infr_active += 1\n\n            infr_total += 1\n\n        # Let's build the embed now\n        embed = Embed(\n            title=name,\n            description=textwrap.dedent(f\"\"\"\n                **User Information**\n                Created: {created}\n                Profile: {user.mention}\n                ID: {user.id}\n\n                **Member Information**\n                Joined: {joined}\n                Roles: {roles or None}\n\n                **Infractions**\n                Total: {infr_total}\n                Active: {infr_active}\n            \"\"\")\n        )\n\n        embed.set_thumbnail(url=user.avatar_url_as(format=\"png\"))\n        embed.colour = user.top_role.colour if roles else Colour.blurple()\n\n        await ctx.send(embed=embed)\n\n\ndef setup(bot: Bot) -> None:\n    \"\"\"Information cog load.\"\"\"\n    bot.add_cog(Information(bot))\n    log.info(\"Cog loaded: Information\")\n", "path": "bot/cogs/information.py"}], "after_files": [{"content": "import colorsys\nimport logging\nimport textwrap\nimport typing\n\nfrom discord import CategoryChannel, Colour, Embed, Member, Role, TextChannel, VoiceChannel, utils\nfrom discord.ext.commands import Bot, Cog, Context, command\n\nfrom bot.constants import Channels, Emojis, MODERATION_ROLES, STAFF_ROLES\nfrom bot.decorators import InChannelCheckFailure, with_role\nfrom bot.utils.checks import with_role_check\nfrom bot.utils.time import time_since\n\nlog = logging.getLogger(__name__)\n\n\nclass Information(Cog):\n    \"\"\"A cog with commands for generating embeds with server info, such as server stats and user info.\"\"\"\n\n    def __init__(self, bot: Bot):\n        self.bot = bot\n\n    @with_role(*MODERATION_ROLES)\n    @command(name=\"roles\")\n    async def roles_info(self, ctx: Context) -> None:\n        \"\"\"Returns a list of all roles and their corresponding IDs.\"\"\"\n        # Sort the roles alphabetically and remove the @everyone role\n        roles = sorted(ctx.guild.roles, key=lambda role: role.name)\n        roles = [role for role in roles if role.name != \"@everyone\"]\n\n        # Build a string\n        role_string = \"\"\n        for role in roles:\n            role_string += f\"`{role.id}` - {role.mention}\\n\"\n\n        # Build an embed\n        embed = Embed(\n            title=\"Role information\",\n            colour=Colour.blurple(),\n            description=role_string\n        )\n\n        embed.set_footer(text=f\"Total roles: {len(roles)}\")\n\n        await ctx.send(embed=embed)\n\n    @with_role(*MODERATION_ROLES)\n    @command(name=\"role\")\n    async def role_info(self, ctx: Context, *roles: typing.Union[Role, str]) -> None:\n        \"\"\"\n        Return information on a role or list of roles.\n\n        To specify multiple roles just add to the arguments, delimit roles with spaces in them using quotation marks.\n        \"\"\"\n        parsed_roles = []\n\n        for role_name in roles:\n            if isinstance(role_name, Role):\n                # Role conversion has already succeeded\n                parsed_roles.append(role_name)\n                continue\n\n            role = utils.find(lambda r: r.name.lower() == role_name.lower(), ctx.guild.roles)\n\n            if not role:\n                await ctx.send(f\":x: Could not convert `{role_name}` to a role\")\n                continue\n\n            parsed_roles.append(role)\n\n        for role in parsed_roles:\n            embed = Embed(\n                title=f\"{role.name} info\",\n                colour=role.colour,\n            )\n\n            embed.add_field(name=\"ID\", value=role.id, inline=True)\n\n            embed.add_field(name=\"Colour (RGB)\", value=f\"#{role.colour.value:0>6x}\", inline=True)\n\n            h, s, v = colorsys.rgb_to_hsv(*role.colour.to_rgb())\n\n            embed.add_field(name=\"Colour (HSV)\", value=f\"{h:.2f} {s:.2f} {v}\", inline=True)\n\n            embed.add_field(name=\"Member count\", value=len(role.members), inline=True)\n\n            embed.add_field(name=\"Position\", value=role.position)\n\n            embed.add_field(name=\"Permission code\", value=role.permissions.value, inline=True)\n\n            await ctx.send(embed=embed)\n\n    @command(name=\"server\", aliases=[\"server_info\", \"guild\", \"guild_info\"])\n    async def server_info(self, ctx: Context) -> None:\n        \"\"\"Returns an embed full of server information.\"\"\"\n        created = time_since(ctx.guild.created_at, precision=\"days\")\n        features = \", \".join(ctx.guild.features)\n        region = ctx.guild.region\n\n        # How many of each type of channel?\n        roles = len(ctx.guild.roles)\n        channels = ctx.guild.channels\n        text_channels = 0\n        category_channels = 0\n        voice_channels = 0\n        for channel in channels:\n            if type(channel) == TextChannel:\n                text_channels += 1\n            elif type(channel) == CategoryChannel:\n                category_channels += 1\n            elif type(channel) == VoiceChannel:\n                voice_channels += 1\n\n        # How many of each user status?\n        member_count = ctx.guild.member_count\n        members = ctx.guild.members\n        online = 0\n        dnd = 0\n        idle = 0\n        offline = 0\n        for member in members:\n            if str(member.status) == \"online\":\n                online += 1\n            elif str(member.status) == \"offline\":\n                offline += 1\n            elif str(member.status) == \"idle\":\n                idle += 1\n            elif str(member.status) == \"dnd\":\n                dnd += 1\n\n        embed = Embed(\n            colour=Colour.blurple(),\n            description=textwrap.dedent(f\"\"\"\n                **Server information**\n                Created: {created}\n                Voice region: {region}\n                Features: {features}\n\n                **Counts**\n                Members: {member_count:,}\n                Roles: {roles}\n                Text: {text_channels}\n                Voice: {voice_channels}\n                Channel categories: {category_channels}\n\n                **Members**\n                {Emojis.status_online} {online}\n                {Emojis.status_idle} {idle}\n                {Emojis.status_dnd} {dnd}\n                {Emojis.status_offline} {offline}\n            \"\"\")\n        )\n\n        embed.set_thumbnail(url=ctx.guild.icon_url)\n\n        await ctx.send(embed=embed)\n\n    @command(name=\"user\", aliases=[\"user_info\", \"member\", \"member_info\"])\n    async def user_info(self, ctx: Context, user: Member = None, hidden: bool = False) -> None:\n        \"\"\"Returns info about a user.\"\"\"\n        if user is None:\n            user = ctx.author\n\n        # Do a role check if this is being executed on someone other than the caller\n        if user != ctx.author and not with_role_check(ctx, *MODERATION_ROLES):\n            await ctx.send(\"You may not use this command on users other than yourself.\")\n            return\n\n        # Non-moderators may only do this in #bot-commands and can't see hidden infractions.\n        if not with_role_check(ctx, *STAFF_ROLES):\n            if not ctx.channel.id == Channels.bot:\n                raise InChannelCheckFailure(Channels.bot)\n            # Hide hidden infractions for users without a moderation role\n            hidden = False\n\n        # User information\n        created = time_since(user.created_at, max_units=3)\n\n        name = str(user)\n        if user.nick:\n            name = f\"{user.nick} ({name})\"\n\n        # Member information\n        joined = time_since(user.joined_at, precision=\"days\")\n\n        # You're welcome, Volcyyyyyyyyyyyyyyyy\n        roles = \", \".join(role.mention for role in user.roles if role.name != \"@everyone\")\n\n        # Infractions\n        infractions = await self.bot.api_client.get(\n            'bot/infractions',\n            params={\n                'hidden': str(hidden),\n                'user__id': str(user.id)\n            }\n        )\n\n        infr_total = 0\n        infr_active = 0\n\n        # At least it's readable.\n        for infr in infractions:\n            if infr[\"active\"]:\n                infr_active += 1\n\n            infr_total += 1\n\n        # Let's build the embed now\n        embed = Embed(\n            title=name,\n            description=textwrap.dedent(f\"\"\"\n                **User Information**\n                Created: {created}\n                Profile: {user.mention}\n                ID: {user.id}\n\n                **Member Information**\n                Joined: {joined}\n                Roles: {roles or None}\n\n                **Infractions**\n                Total: {infr_total}\n                Active: {infr_active}\n            \"\"\")\n        )\n\n        embed.set_thumbnail(url=user.avatar_url_as(format=\"png\"))\n        embed.colour = user.top_role.colour if roles else Colour.blurple()\n\n        await ctx.send(embed=embed)\n\n\ndef setup(bot: Bot) -> None:\n    \"\"\"Information cog load.\"\"\"\n    bot.add_cog(Information(bot))\n    log.info(\"Cog loaded: Information\")\n", "path": "bot/cogs/information.py"}]}