Check channel type before trying to access category
The fix is the same as https://github.com/python-discord/bot/commit/1509d3b1c39fac825d5e5a09fd0caf780db7c91c. I just overlooked applying it to `help_channels.py` too.

```
Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "/bot/bot/cogs/help_channels.py", line 516, in on_message
    if channel.category and channel.category.id != constants.Categories.help_available:
AttributeError: 'DMChannel' object has no attribute 'category'
```
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 692bb234..e73bbdae 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -420,6 +420,12 @@ class HelpChannels(Scheduler, commands.Cog):
         embed = message.embeds[0]
         return message.author == self.bot.user and embed.description.strip() == DORMANT_MSG.strip()
 
+    @staticmethod
+    def is_in_category(channel: discord.TextChannel, category_id: int) -> bool:
+        """Return True if `channel` is within a category with `category_id`."""
+        actual_category = getattr(channel, "category", None)
+        return actual_category is not None and actual_category.id == category_id
+
     async def move_idle_channel(self, channel: discord.TextChannel, has_task: bool = True) -> None:
         """
         Make the `channel` dormant if idle or schedule the move if still active.
@@ -581,7 +587,7 @@ class HelpChannels(Scheduler, commands.Cog):
             return  # Ignore messages sent by bots.
 
         channel = message.channel
-        if channel.category and channel.category.id != constants.Categories.help_available:
+        if not self.is_in_category(channel, constants.Categories.help_available):
             return  # Ignore messages outside the Available category.
 
         log.trace("Waiting for the cog to be ready before processing messages.")
@@ -591,7 +597,7 @@ class HelpChannels(Scheduler, commands.Cog):
         async with self.on_message_lock:
             log.trace(f"on_message lock acquired for {message.id}.")
 
-            if channel.category and channel.category.id != constants.Categories.help_available:
+            if not self.is_in_category(channel, constants.Categories.help_available):
                 log.debug(
                     f"Message {message.id} will not make #{channel} ({channel.id}) in-use "
                     f"because another message in the channel already triggered that."
['bot/cogs/help_channels.py']