|
39 | 39 | InviteTarget,
|
40 | 40 | SortOrder,
|
41 | 41 | StagePrivacyLevel,
|
42 |
| - ThreadAutoArchiveDuration, |
43 | 42 | VideoQualityMode,
|
44 | 43 | VoiceRegion,
|
45 | 44 | try_enum,
|
46 | 45 | )
|
| 46 | +from .enums import ThreadArchiveDuration as ThreadAutoArchiveDuration |
47 | 47 | from .errors import ClientException, InvalidArgument
|
48 | 48 | from .file import File
|
49 | 49 | from .flags import ChannelFlags
|
@@ -1133,7 +1133,7 @@ async def edit(self, *, reason=None, **options):
|
1133 | 1133 | default_auto_archive_duration: :class:`int`
|
1134 | 1134 | The new default auto archive duration in minutes for threads created in this channel.
|
1135 | 1135 | Must be one of ``60``, ``1440``, ``4320``, or ``10080``.
|
1136 |
| - **ThreadAutoArchiveDuration** enum can be used for better understanding. |
| 1136 | + :class:`ThreadAutoArchiveDuration` can be used alternatively. |
1137 | 1137 | default_thread_slowmode_delay: :class:`int`
|
1138 | 1138 | The new default slowmode delay in seconds for threads created in this channel.
|
1139 | 1139 |
|
@@ -1177,14 +1177,6 @@ async def edit(self, *, reason=None, **options):
|
1177 | 1177 | options["flags"] = ChannelFlags._from_value(self.flags.value)
|
1178 | 1178 | options["flags"].require_tag = options.pop("require_tag")
|
1179 | 1179 |
|
1180 |
| - if "default_auto_archive_duration" in options: |
1181 |
| - default_auto_archive_duration = options["default_auto_archive_duration"] |
1182 |
| - options["default_auto_archive_duration"] = ( |
1183 |
| - default_auto_archive_duration |
1184 |
| - if isinstance(default_auto_archive_duration, (int, float)) |
1185 |
| - else default_auto_archive_duration.value |
1186 |
| - ) |
1187 |
| - |
1188 | 1180 | payload = await self._edit(options, reason=reason)
|
1189 | 1181 | if payload is not None:
|
1190 | 1182 | # the payload will always be the proper channel payload
|
|
0 commit comments