mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
Add support for default_thread_slowmode_delay in TextChannel
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user