mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
Add more options to Guild.create_forum
This commit is contained in:
parent
40b91f0e2a
commit
aa0acf1d56
@ -1566,6 +1566,8 @@ class Guild(Hashable):
|
||||
overwrites: Mapping[Union[Role, Member], PermissionOverwrite] = MISSING,
|
||||
reason: Optional[str] = None,
|
||||
default_auto_archive_duration: int = MISSING,
|
||||
default_thread_slowmode_delay: int = MISSING,
|
||||
available_tags: Sequence[ForumTag] = MISSING,
|
||||
) -> ForumChannel:
|
||||
"""|coro|
|
||||
|
||||
@ -1600,6 +1602,14 @@ class Guild(Hashable):
|
||||
The reason for creating this channel. Shows up in the audit log.
|
||||
default_auto_archive_duration: :class:`int`
|
||||
The default auto archive duration for threads created in the forum channel (in minutes).
|
||||
default_thread_slowmode_delay: :class:`int`
|
||||
The default slowmode delay in seconds for threads created in this forum.
|
||||
|
||||
.. versionadded:: 2.1
|
||||
available_tags: Sequence[:class:`ForumTag`]
|
||||
The available tags for this forum channel.
|
||||
|
||||
.. versionadded:: 2.1
|
||||
|
||||
Raises
|
||||
-------
|
||||
@ -1632,6 +1642,12 @@ class Guild(Hashable):
|
||||
if default_auto_archive_duration is not MISSING:
|
||||
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
|
||||
|
||||
if available_tags is not MISSING:
|
||||
options['available_tags'] = [t.to_dict() for t in available_tags]
|
||||
|
||||
data = await self._create_channel(
|
||||
name=name, overwrites=overwrites, channel_type=ChannelType.forum, category=category, reason=reason, **options
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user