-
-
Notifications
You must be signed in to change notification settings - Fork 477
feat: add ThreadAutoArchiveDuration enum #2826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 9 commits
3679443
1424acf
a7d46af
3747633
bd5c404
be7b9bf
a24912a
4593a84
595aaeb
979f6c1
fecbf54
6145605
ed8dce1
e37c7f7
ad88445
68a6cdc
b53eab8
9f64f20
6c62744
1a32255
e6906ed
7419df8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,9 @@ | |
InviteTarget, | ||
SortOrder, | ||
StagePrivacyLevel, | ||
) | ||
from .enums import ThreadArchiveDuration as ThreadArchiveDurationEnum | ||
from .enums import ( | ||
Lulalaby marked this conversation as resolved.
Show resolved
Hide resolved
Lulalaby marked this conversation as resolved.
Show resolved
Hide resolved
|
||
VideoQualityMode, | ||
VoiceRegion, | ||
try_enum, | ||
|
@@ -1084,7 +1087,9 @@ async def edit( | |
sync_permissions: bool = ..., | ||
category: CategoryChannel | None = ..., | ||
slowmode_delay: int = ..., | ||
default_auto_archive_duration: ThreadArchiveDuration = ..., | ||
default_auto_archive_duration: ( | ||
ThreadArchiveDuration | ThreadArchiveDurationEnum | ||
) = ..., | ||
default_thread_slowmode_delay: int = ..., | ||
default_sort_order: SortOrder = ..., | ||
default_reaction_emoji: GuildEmoji | int | str | None = ..., | ||
|
@@ -1130,6 +1135,7 @@ async def edit(self, *, reason=None, **options): | |
default_auto_archive_duration: :class:`int` | ||
The new default auto archive duration in minutes for threads created in this channel. | ||
Must be one of ``60``, ``1440``, ``4320``, or ``10080``. | ||
:class:`ThreadAutoArchiveDuration` can be used alternatively. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes the type a union There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👌 |
||
default_thread_slowmode_delay: :class:`int` | ||
The new default slowmode delay in seconds for threads created in this channel. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,9 @@ | |
from typing import TYPE_CHECKING, Callable, Iterable | ||
|
||
from .abc import Messageable, _purge_messages_helper | ||
from .enums import ChannelType, try_enum | ||
from .enums import ChannelType | ||
from .enums import ThreadArchiveDuration as ThreadArchiveDurationEnum | ||
from .enums import try_enum | ||
Lulalaby marked this conversation as resolved.
Show resolved
Hide resolved
Lulalaby marked this conversation as resolved.
Show resolved
Hide resolved
|
||
from .errors import ClientException | ||
from .flags import ChannelFlags | ||
from .mixins import Hashable | ||
|
@@ -602,7 +604,9 @@ async def edit( | |
locked: bool = MISSING, | ||
invitable: bool = MISSING, | ||
slowmode_delay: int = MISSING, | ||
auto_archive_duration: ThreadArchiveDuration = MISSING, | ||
auto_archive_duration: ( | ||
ThreadArchiveDurationEnum | ThreadArchiveDuration | ||
BOXERRMD marked this conversation as resolved.
Show resolved
Hide resolved
|
||
) = MISSING, | ||
pinned: bool = MISSING, | ||
applied_tags: list[ForumTag] = MISSING, | ||
reason: str | None = None, | ||
|
@@ -632,6 +636,7 @@ async def edit( | |
auto_archive_duration: :class:`int` | ||
The new duration in minutes before a thread is automatically archived for inactivity. | ||
Must be one of ``60``, ``1440``, ``4320``, or ``10080``. | ||
:class:`ThreadAutoArchiveDuration` can be used alternatively. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This makes the type a union There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👌 |
||
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``. | ||
|
Uh oh!
There was an error while loading. Please reload this page.