Add support for default_thread_slowmode_delay in TextChannel

This commit is contained in:
Puncher
2023-03-05 23:31:14 +01:00
committed by GitHub
parent a1295868a6
commit 79c508311f
2 changed files with 19 additions and 1 deletions

View File

@ -1200,6 +1200,7 @@ class Guild(Hashable):
nsfw: bool = MISSING,
overwrites: Mapping[Union[Role, Member], PermissionOverwrite] = MISSING,
default_auto_archive_duration: int = MISSING,
default_thread_slowmode_delay: int = MISSING,
) -> TextChannel:
"""|coro|
@ -1273,6 +1274,10 @@ class Guild(Hashable):
Must be one of ``60``, ``1440``, ``4320``, or ``10080``.
.. versionadded:: 2.0
default_thread_slowmode_delay: :class:`int`
The default slowmode delay in seconds for threads created in the text channel.
.. versionadded:: 2.3
reason: Optional[:class:`str`]
The reason for creating this channel. Shows up on the audit log.
@ -1305,7 +1310,10 @@ class Guild(Hashable):
options['nsfw'] = nsfw
if default_auto_archive_duration is not MISSING:
options["default_auto_archive_duration"] = default_auto_archive_duration
options['default_auto_archive_duration'] = default_auto_archive_duration
if default_thread_slowmode_delay is not MISSING:
options['default_thread_rate_limit_per_user'] = default_thread_slowmode_delay
data = await self._create_channel(
name,