Browse Source

Merge 7047e36b68 into 26855160f8

pull/10178/merge
owocado 4 weeks ago
committed by GitHub
parent
commit
ac567c8a52
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      discord/threads.py

6
discord/threads.py

@ -272,12 +272,14 @@ class Thread(Messageable, Hashable):
.. versionadded:: 2.1
"""
tags = []
if self.parent is None or self.parent.type != ChannelType.forum:
if self.parent is None or self.parent.type not in (ChannelType.forum, ChannelType.media):
return tags
parent = self.parent
for tag_id in self._applied_tags:
tag = parent.get_tag(tag_id)
tag = parent.get_tag( # pyright: ignore[reportAttributeAccessIssue] # parent here will be ForumChannel instance
tag_id
)
if tag is not None:
tags.append(tag)

Loading…
Cancel
Save