Browse Source

Update flags and applied tags on thread update

pull/10109/head
Lilly Rose Berner 3 years ago
committed by dolfies
parent
commit
adf40da8dc
  1. 2
      discord/threads.py
  2. 1
      discord/types/threads.py

2
discord/threads.py

@ -192,6 +192,8 @@ class Thread(Messageable, Hashable):
def _update(self, data):
old = copy.copy(self)
self.slowmode_delay = data.get('rate_limit_per_user', 0)
self._flags: int = data.get('flags', 0)
self._applied_tags: array.array[int] = array.array('Q', map(int, data.get('applied_tags', [])))
if (meta := data.get('thread_metadata')) is not None:
self._unroll_metadata(meta)

1
discord/types/threads.py

@ -68,6 +68,7 @@ class Thread(TypedDict):
last_pin_timestamp: NotRequired[Optional[Snowflake]]
newly_created: NotRequired[bool]
flags: NotRequired[int]
applied_tags: NotRequired[List[Snowflake]]
class ThreadPaginationPayload(TypedDict):

Loading…
Cancel
Save