Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions discord/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ class Thread(Messageable, Hashable):
Usually a value of 60, 1440, 4320 and 10080.
archive_timestamp: :class:`datetime.datetime`
An aware timestamp of when the thread's archived status was last updated in UTC.
created_at: Optional[:class:`datetime.datetime`]
An aware timestamp of when the thread was created.
Only available for threads created after 2022-01-09.
"""

__slots__ = (
Expand All @@ -141,6 +144,7 @@ class Thread(Messageable, Hashable):
'invitable',
'auto_archive_duration',
'archive_timestamp',
'created_at',
)

def __init__(self, *, guild: Guild, state: ConnectionState, data: ThreadPayload):
Expand Down Expand Up @@ -186,6 +190,7 @@ def _unroll_metadata(self, data: ThreadMetadata):
self.archive_timestamp = parse_time(data['archive_timestamp'])
self.locked = data.get('locked', False)
self.invitable = data.get('invitable', True)
self.created_at = parse_time(data.get('create_timestamp'))

def _update(self, data):
try:
Expand Down