Skip to content

Commit 7b28073

Browse files
owocadodolfies
authored andcommitted
Fix Thread.applied_tags for media channels
1 parent 0ec1193 commit 7b28073

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/threads.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,12 @@ def members(self) -> List[ThreadMember]:
282282
def applied_tags(self) -> List[ForumTag]:
283283
"""List[:class:`ForumTag`]: A list of tags applied to this thread."""
284284
tags = []
285-
if self.parent is None or self.parent.type != ChannelType.forum:
285+
if self.parent is None or self.parent.type not in (ChannelType.forum, ChannelType.media):
286286
return tags
287287

288288
parent = self.parent
289289
for tag_id in self._applied_tags:
290-
tag = parent.get_tag(tag_id) # type: ignore
290+
tag = parent.get_tag(tag_id) # type: ignore # parent here will be ForumChannel instance
291291
if tag is not None:
292292
tags.append(tag)
293293

0 commit comments

Comments
 (0)