Repository: python-discord/bot
Issue: AttributeError: 'TalentPool' object has no attribute 'cache'

Sentry Issue: [BOT-3AR](https://sentry.io/organizations/python-discord/issues/3767571452/?referrer=github_integration)

```
AttributeError: 'TalentPool' object has no attribute 'cache'
  File "discord/ext/commands/core.py", line 229, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/info/information.py", line 227, in server_info
    embed.add_field(name="Moderation:", value=self.get_extended_server_info(ctx))
  File "bot/exts/info/information.py", line 83, in get_extended_server_info
    num_nominated = len(cog.cache) if cog.cache else "-"

Error executing command invoked by Scofflaw#6970: !server
```

Changed files:
bot/exts/info/information.py

diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py
index 1a6cfcb5..c680da2b 100644
--- a/bot/exts/info/information.py
+++ b/bot/exts/info/information.py
@@ -3,7 +3,7 @@ import pprint
 import textwrap
 from collections import defaultdict
 from textwrap import shorten
-from typing import Any, DefaultDict, Mapping, Optional, Set, Tuple, Union
+from typing import Any, DefaultDict, Mapping, Optional, Set, TYPE_CHECKING, Tuple, Union
 
 import rapidfuzz
 from discord import AllowedMentions, Colour, Embed, Guild, Message, Role
@@ -31,6 +31,11 @@ DEFAULT_RULES_DESCRIPTION = (
     " all members of the community to have read and understood these."
 )
 
+if TYPE_CHECKING:
+    from bot.exts.moderation.defcon import Defcon
+    from bot.exts.moderation.watchchannels.bigbrother import BigBrother
+    from bot.exts.recruitment.talentpool._cog import TalentPool
+
 
 class Information(Cog):
     """A cog with commands for generating embeds with server info, such as server stats and user info."""
@@ -76,20 +81,23 @@ class Information(Cog):
         )
         return role_stats
 
-    def get_extended_server_info(self, ctx: Context) -> str:
+    async def get_extended_server_info(self, ctx: Context) -> str:
         """Return additional server info only visible in moderation channels."""
         talentpool_info = ""
-        if cog := self.bot.get_cog("Talentpool"):
-            num_nominated = len(cog.cache) if cog.cache else "-"
+        talentpool_cog: TalentPool | None = self.bot.get_cog("Talentpool")
+        if talentpool_cog:
+            num_nominated = len(await talentpool_cog.api.get_nominations(active=True))
             talentpool_info = f"Nominated: {num_nominated}\\n"
 
         bb_info = ""
-        if cog := self.bot.get_cog("Big Brother"):
-            bb_info = f"BB-watched: {len(cog.watched_users)}\\n"
+        bb_cog: BigBrother | None = self.bot.get_cog("Big Brother")
+        if bb_cog:
+            bb_info = f"BB-watched: {len(bb_cog.watched_users)}\\n"
 
         defcon_info = ""
-        if cog := self.bot.get_cog("Defcon"):
-            threshold = time.humanize_delta(cog.threshold) if cog.threshold else "-"
+        defcon_cog: Defcon | None = self.bot.get_cog("Defcon")
+        if defcon_cog:
+            threshold = time.humanize_delta(defcon_cog.threshold) if defcon_cog.threshold else "-"
             defcon_info = f"Defcon threshold: {threshold}\\n"
 
         verification = f"Verification level: {ctx.guild.verification_level.name}\\n"
@@ -224,7 +232,7 @@ class Information(Cog):
 
         # Additional info if ran in moderation channels
         if is_mod_channel(ctx.channel):
-            embed.add_field(name="Moderation:", value=self.get_extended_server_info(ctx))
+            embed.add_field(name="Moderation:", value=await self.get_extended_server_info(ctx))
 
         await ctx.send(embed=embed)