Skip to content

Commit

Permalink
add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby authored Nov 7, 2022
1 parent 0b1a082 commit 5400898
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ async def create_stage_channel(
self._channels[channel.id] = channel
return channel

# todo: add flags, default_thread_rate_limit_per_user, default_sort_order
async def create_forum_channel(
self,
name: str,
Expand Down
4 changes: 4 additions & 0 deletions discord/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class Thread(Messageable, Hashable):
Number of messages ever sent in a thread.
It's similar to message_count on message creation,
but will not decrement the number when a message is deleted.
applied_tags:
.. versionadded:: 2.0
"""
Expand All @@ -156,6 +157,7 @@ class Thread(Messageable, Hashable):
"created_at",
"flags",
"total_message_sent",
"applied_tags,"
)

def __init__(self, *, guild: Guild, state: ConnectionState, data: ThreadPayload):
Expand Down Expand Up @@ -195,6 +197,7 @@ 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)
# todo: add 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 Expand Up @@ -562,6 +565,7 @@ def is_me(m):
reason=reason,
)

# todo: add applied_tags, flags
async def edit(
self,
*,
Expand Down
1 change: 1 addition & 0 deletions discord/types/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class ThreadMetadata(TypedDict):
locked: bool


# todo: add applied_tags
class Thread(TypedDict):
member: NotRequired[ThreadMember]
last_message_id: NotRequired[Snowflake | None]
Expand Down

0 comments on commit 5400898

Please sign in to comment.