Skip to content

Commit 913a6f8

Browse files
authored
fix: Don't apply guild_id to messages fetched from DM history (#1424)
1 parent 99ad1d5 commit 913a6f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

interactions/models/discord/channel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,9 @@ async def fetch_messages(
348348
messages_data = await self._client.http.get_channel_messages(
349349
self.id, limit, around=around, before=before, after=after
350350
)
351-
for m in messages_data:
352-
m["guild_id"] = self._guild_id
351+
if isinstance(self, GuildChannel):
352+
for m in messages_data:
353+
m["guild_id"] = self._guild_id
353354

354355
return [self._client.cache.place_message_data(m) for m in messages_data]
355356

0 commit comments

Comments
 (0)