|
28 | 28 | from typing import TYPE_CHECKING, Callable, Iterable
|
29 | 29 |
|
30 | 30 | from .abc import Messageable, _purge_messages_helper
|
31 |
| -from .enums import ChannelType, try_enum |
| 31 | +from .enums import ( |
| 32 | + ChannelType, |
| 33 | +) |
| 34 | +from .enums import ThreadArchiveDuration as ThreadArchiveDurationEnum |
| 35 | +from .enums import ( |
| 36 | + try_enum, |
| 37 | +) |
32 | 38 | from .errors import ClientException
|
33 | 39 | from .flags import ChannelFlags
|
34 | 40 | from .mixins import Hashable
|
@@ -602,7 +608,9 @@ async def edit(
|
602 | 608 | locked: bool = MISSING,
|
603 | 609 | invitable: bool = MISSING,
|
604 | 610 | slowmode_delay: int = MISSING,
|
605 |
| - auto_archive_duration: ThreadArchiveDuration = MISSING, |
| 611 | + auto_archive_duration: ( |
| 612 | + ThreadArchiveDuration | ThreadArchiveDurationEnum |
| 613 | + ) = MISSING, |
606 | 614 | pinned: bool = MISSING,
|
607 | 615 | applied_tags: list[ForumTag] = MISSING,
|
608 | 616 | reason: str | None = None,
|
@@ -632,6 +640,7 @@ async def edit(
|
632 | 640 | auto_archive_duration: :class:`int`
|
633 | 641 | The new duration in minutes before a thread is automatically archived for inactivity.
|
634 | 642 | Must be one of ``60``, ``1440``, ``4320``, or ``10080``.
|
| 643 | + :class:`ThreadArchiveDuration` can be used alternatively. |
635 | 644 | slowmode_delay: :class:`int`
|
636 | 645 | Specifies the slowmode rate limit for user in this thread, in seconds.
|
637 | 646 | A value of ``0`` disables slowmode. The maximum value possible is ``21600``.
|
|
0 commit comments