Repository: interactions-py/interactions.py

Issue:
[BUG] Unsupported channel type
### Library Version

Release 5.7.0

### Describe the Bug

Got this error when starting the discord bot, and it's been reported in the discord server [here](https://discord.com/channels/789032594456576001/1124813096742039582) and [here](https://discord.com/channels/789032594456576001/1124719972560666656) might as well as put it here like it says.
```
Unsupported channel type for {'version': 1688246476947, 'type': 16, 'topic': None, 'template': '', 'rate_limit_per_user': 0, 'position': 0, 'permission_overwrites': [{'type': 0, 'id': '874709931612315678', 'deny': '0', 'allow': '377957182528'}, {'type': 0, 'id': '1106563044248657971', 'deny': '128641584856913', 'allow': '0'}, {'type': 0, 'id': '875786221018841181', 'deny': '17180008448', 'allow': '515396455489'}, {'type': 0, 'id': '1091834304776130581', 'deny': '0', 'allow': '68609'}, {'type': 0, 'id': '905542278192439346', 'deny': '377959221312', 'allow': '66560'}, {'type': 0, 'id': '864557936068395018', 'deny': '533381774416', 'allow': '2150629377'}], 'parent_id': '890301488260341800', 'nsfw': False, 'name': 'new-media', 'last_message_id': None, 'id': '1124811992167874763', 'hashes': {'version': 1, 'roles': {'hash': 'Cw77Dg'}, 'metadata': {'hash': '/8VcZg'}, 'channels': {'hash': 'E6X/kQ'}}, 'guild_id': '864557936068395018', 'guild_hashes': {'version': 1, 'roles': {'hash': 'Cw77Dg'}, 'metadata': {'hash': '/8VcZg'}, 'channels': {'hash': 'E6X/kQ'}}, 'flags': 0, 'default_sort_order': None, 'default_reaction_emoji': None, 'default_forum_layout': 2, 'available_tags': []} (16).
```

### Steps to Reproduce

* Start your discord bot up, and look at the console.

### Expected Results

For this not to pop up and implement this as a channel type.

### Minimal Reproducible Code

```python
* Start your discord bot up, and look at the console.
```


### Traceback

```
Unsupported channel type for {'version': 1688246476947, 'type': 16, 'topic': None, 'template': '', 'rate_limit_per_user': 0, 'position': 0, 'permission_overwrites': [{'type': 0, 'id': '874709931612315678', 'deny': '0', 'allow': '377957182528'}, {'type': 0, 'id': '1106563044248657971', 'deny': '128641584856913', 'allow': '0'}, {'type': 0, 'id': '875786221018841181', 'deny': '17180008448', 'allow': '515396455489'}, {'type': 0, 'id': '1091834304776130581', 'deny': '0', 'allow': '68609'}, {'type': 0, 'id': '905542278192439346', 'deny': '377959221312', 'allow': '66560'}, {'type': 0, 'id': '864557936068395018', 'deny': '533381774416', 'allow': '2150629377'}], 'parent_id': '890301488260341800', 'nsfw': False, 'name': 'new-media', 'last_message_id': None, 'id': '1124811992167874763', 'hashes': {'version': 1, 'roles': {'hash': 'Cw77Dg'}, 'metadata': {'hash': '/8VcZg'}, 'channels': {'hash': 'E6X/kQ'}}, 'guild_id': '864557936068395018', 'guild_hashes': {'version': 1, 'roles': {'hash': 'Cw77Dg'}, 'metadata': {'hash': '/8VcZg'}, 'channels': {'hash': 'E6X/kQ'}}, 'flags': 0, 'default_sort_order': None, 'default_reaction_emoji': None, 'default_forum_layout': 2, 'available_tags': []} (16).
```

### Checklist

- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.
- [X] I have attempted to debug this myself, and I believe this issue is with the library

### Additional Information

_No response_


Discussion:
#1458 will close this.
Do you want me to close this issue? Also, what the ETA of this pr?
No harm in keeping the issue, but no idea when the PR will be finished. We're a bit slow right now for various reasons, but I'd imagine it'll be finished sooner rather than later.
Alright, thank you.
When I mention media channel in any channel, it comes up with 

```
Task exception was never retrieved
future: <Task finished name='Task-253' coro=<MessageEvents._on_raw_message_create() done, defined at /config/.local/lib/python3.10/site-packages/interactions/api/events/processors/message_events.py:15> exception=AttributeError("'BaseChannel' object has no attribute '_guild_id'")>
Traceback (most recent call last):
  File "/config/.local/lib/python3.10/site-packages/interactions/api/events/processors/message_events.py", line 24, in _on_raw_message_create
    msg = self.cache.place_message_data(event.data)
  File "/config/.local/lib/python3.10/site-packages/interactions/client/smart_cache.py", line 421, in place_message_data
    message = Message.from_dict(data, self._client)
  File "/config/.local/lib/python3.10/site-packages/interactions/models/discord/base.py", line 36, in from_dict
    data = cls._process_dict(data, client)
  File "/config/.local/lib/python3.10/site-packages/interactions/models/discord/message.py", line 468, in _process_dict
    "guild_id": channel._guild_id,
AttributeError: 'BaseChannel' object has no attribute '_guild_id'
Task exception was never retrieved
future: <Task finished name='Task-258' coro=<ReactionEvents._on_raw_message_reaction_add() done, defined at /config/.local/lib/python3.10/site-packages/interactions/api/events/processors/reaction_events.py:66> exception=AttributeError("'BaseChannel' object has no attribute '_guild_id'")>
Traceback (most recent call last):
  File "/config/.local/lib/python3.10/site-packages/interactions/api/events/processors/reaction_events.py", line 68, in _on_raw_message_reaction_add
    await self._handle_message_reaction_change(event, add=True)
  File "/config/.local/lib/python3.10/site-packages/interactions/api/events/processors/reaction_events.py", line 56, in _handle_message_reaction_change
    message = await self.cache.fetch_message(event.data.get("channel_id"), event.data.get("message_id"))
  File "/config/.local/lib/python3.10/site-packages/interactions/client/smart_cache.py", line 384, in fetch_message
    message = self.place_message_data(data)
  File "/config/.local/lib/python3.10/site-packages/interactions/client/smart_cache.py", line 421, in place_message_data
    message = Message.from_dict(data, self._client)
  File "/config/.local/lib/python3.10/site-packages/interactions/models/discord/base.py", line 36, in from_dict
    data = cls._process_dict(data, client)
  File "/config/.local/lib/python3.10/site-packages/interactions/models/discord/message.py", line 468, in _process_dict
    "guild_id": channel._guild_id,
AttributeError: 'BaseChannel' object has no attribute '_guild_id'
```
this error. I do believe it will be solved in #1458, but I'm not sure.
That's a bug with base channels. Nothing to do with your issue 


Ref the media channel pr. It's functional now; its only draft because media channels were early beta when I made it 

They're more widespread now - assuming unpacking goes as planned I'll be able to retest and merge tomorrow 
> That's a bug with base channels. Nothing to do with your issue

Do you want me to re-open an issue in Discord or Git Hub for this issue? 

Resolving patch:
diff --git a/interactions/models/discord/message.py b/interactions/models/discord/message.py
--- a/interactions/models/discord/message.py
+++ b/interactions/models/discord/message.py
@@ -24,7 +24,7 @@
 from interactions.client.utils.attr_converters import timestamp_converter
 from interactions.client.utils.serializer import dict_filter_none
 from interactions.client.utils.text_utils import mentions
-from interactions.models.discord.channel import BaseChannel
+from interactions.models.discord.channel import BaseChannel, GuildChannel
 from interactions.models.discord.emoji import process_emoji_req_format
 from interactions.models.discord.file import UPLOADABLE_TYPE
 from interactions.models.discord.embed import process_embeds
@@ -109,7 +109,7 @@ def _process_dict(cls, data: Dict[str, Any], _) -> Dict[str, Any]:
 
 @attrs.define(eq=False, order=False, hash=False, kw_only=True)
 class ChannelMention(DiscordObject):
-    guild_id: "Snowflake_Type" = attrs.field(
+    guild_id: "Snowflake_Type | None" = attrs.field(
         repr=False,
     )
     """id of the guild containing the channel"""
@@ -466,7 +466,7 @@ def _process_dict(cls, data: dict, client: "Client") -> dict:  # noqa: C901
                 if channel_id not in found_ids and (channel := client.get_channel(channel_id)):
                     channel_data = {
                         "id": channel.id,
-                        "guild_id": channel._guild_id,
+                        "guild_id": channel._guild_id if isinstance(channel, GuildChannel) else None,
                         "type": channel.type,
                         "name": channel.name,
                     }


Test patch: