Vioshim
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
1 deletions
-
discord/threads.py
|
|
@ -517,6 +517,7 @@ class Thread(Messageable, Hashable): |
|
|
|
pinned: bool = MISSING, |
|
|
|
slowmode_delay: int = MISSING, |
|
|
|
auto_archive_duration: ThreadArchiveDuration = MISSING, |
|
|
|
reason: Optional[str] = None, |
|
|
|
) -> Thread: |
|
|
|
"""|coro| |
|
|
|
|
|
|
@ -548,6 +549,8 @@ class Thread(Messageable, Hashable): |
|
|
|
slowmode_delay: :class:`int` |
|
|
|
Specifies the slowmode rate limit for user in this thread, in seconds. |
|
|
|
A value of ``0`` disables slowmode. The maximum value possible is ``21600``. |
|
|
|
reason: Optional[:class:`str`] |
|
|
|
The reason for editing this thread. Shows up on the audit log. |
|
|
|
|
|
|
|
Raises |
|
|
|
------- |
|
|
@ -579,7 +582,7 @@ class Thread(Messageable, Hashable): |
|
|
|
flags.pinned = pinned |
|
|
|
payload['flags'] = flags.value |
|
|
|
|
|
|
|
data = await self._state.http.edit_channel(self.id, **payload) |
|
|
|
data = await self._state.http.edit_channel(self.id, **payload, reason=reason) |
|
|
|
# The data payload will always be a Thread payload |
|
|
|
return Thread(data=data, state=self._state, guild=self.guild) # type: ignore |
|
|
|
|
|
|
|