AttributeError: 'NoneType' object has no attribute 'id'
Sentry Issue: [BOT-36E](https://sentry.io/organizations/python-discord/issues/3401907515/?referrer=github_integration)

```
AttributeError: 'NoneType' object has no attribute 'id'
  File "discord/client.py", line 456, in _run_event
    await coro(*args, **kwargs)
  File "bot/exts/moderation/modlog.py", line 673, in on_raw_message_delete
    await self.log_uncached_deleted_message(event)
  File "bot/exts/moderation/modlog.py", line 634, in log_uncached_deleted_message
    if self.is_channel_ignored(event.channel_id):
  File "bot/exts/moderation/modlog.py", line 555, in is_channel_ignored
    if not channel or not hasattr(channel, "guild") or channel.guild.id != GuildConstant.id:

Unhandled exception in on_raw_message_delete.
```
diff --git a/bot/exts/moderation/modlog.py b/bot/exts/moderation/modlog.py
index 67991730..efa87ce2 100644
--- a/bot/exts/moderation/modlog.py
+++ b/bot/exts/moderation/modlog.py
@@ -552,7 +552,7 @@ class ModLog(Cog, name="ModLog"):
         channel = self.bot.get_channel(channel_id)
 
         # Ignore not found channels, DMs, and messages outside of the main guild.
-        if not channel or not hasattr(channel, "guild") or channel.guild.id != GuildConstant.id:
+        if not channel or channel.guild is None or channel.guild.id != GuildConstant.id:
             return True
 
         # Look at the parent channel of a thread.
['bot/exts/moderation/modlog.py']