Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: map received applied_tags to int #1817

Merged
merged 4 commits into from
Dec 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ _No changes yet_
`ext.bridge.Bot`. ([#1815](https://github.com/Pycord-Development/pycord/pull/1815))
- Fixed an `AttributeError` in select relating to the select type.
([#1814](https://github.com/Pycord-Development/pycord/pull/1814))
- Fix `Thread.applied_tags` always returning an empty list.
([#1817](https://github.com/Pycord-Development/pycord/pull/1817))

## [2.3.1] - 2022-11-27

Expand Down
4 changes: 3 additions & 1 deletion discord/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ def _from_data(self, data: ThreadPayload):
self.member_count = data.get("member_count", None)
self.flags: ChannelFlags = ChannelFlags._from_value(data.get("flags", 0))
self.total_message_sent = data.get("total_message_sent", None)
self._applied_tags: list[int] = data.get("applied_tags", [])
self._applied_tags: list[int] = [
int(tag_id) for tag_id in data.get("applied_tags", [])
]

# Here, we try to fill in potentially missing data
if thread := self.guild.get_thread(self.id) and data.pop("_invoke_flag", False):
Expand Down