diff options
-rw-r--r-- | bot/exts/info/information.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py index c04bf72a6..482b1efba 100644 --- a/bot/exts/info/information.py +++ b/bot/exts/info/information.py @@ -323,6 +323,7 @@ class Information(Cog): if is_mod_channel(ctx.channel): fields.append(await self.expanded_user_infraction_counts(user)) fields.append(await self.user_nomination_counts(user)) + fields.append(await self.user_alt_count(user)) else: fields.append(await self.basic_user_infraction_counts(user)) @@ -340,6 +341,12 @@ class Information(Cog): return embed + async def user_alt_count(self, user: MemberOrUser) -> tuple[str, int | str]: + """Get the number oif alts for the given member.""" + resp = await self.bot.api_client.get(f"bot/users/{user.id}") + return ("Associated accounts", len(resp["alts"]) or "No associated accounts") + + async def basic_user_infraction_counts(self, user: MemberOrUser) -> tuple[str, str]: """Gets the total and active infraction counts for the given `member`.""" infractions = await self.bot.api_client.get( |