mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-23 11:26:51 +00:00
Add invitable to TextChannel.create_thread
This commit is contained in:
parent
08bee0eeb6
commit
4248bb3717
@ -679,6 +679,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
|||||||
auto_archive_duration: ThreadArchiveDuration = MISSING,
|
auto_archive_duration: ThreadArchiveDuration = MISSING,
|
||||||
type: Optional[ChannelType] = None,
|
type: Optional[ChannelType] = None,
|
||||||
reason: Optional[str] = None,
|
reason: Optional[str] = None,
|
||||||
|
invitable: bool = True,
|
||||||
) -> Thread:
|
) -> Thread:
|
||||||
"""|coro|
|
"""|coro|
|
||||||
|
|
||||||
@ -706,6 +707,9 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
|||||||
By default this creates a private thread if this is ``None``.
|
By default this creates a private thread if this is ``None``.
|
||||||
reason: :class:`str`
|
reason: :class:`str`
|
||||||
The reason for creating a new thread. Shows up on the audit log.
|
The reason for creating a new thread. Shows up on the audit log.
|
||||||
|
invitable: :class:`bool`
|
||||||
|
Whether non-modertators can add users to the thread. Only applicable to private threads.
|
||||||
|
Defaults to ``True``.
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
@ -730,6 +734,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
|||||||
auto_archive_duration=auto_archive_duration or self.default_auto_archive_duration,
|
auto_archive_duration=auto_archive_duration or self.default_auto_archive_duration,
|
||||||
type=type.value,
|
type=type.value,
|
||||||
reason=reason,
|
reason=reason,
|
||||||
|
invitable=invitable,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
data = await self._state.http.start_thread_with_message(
|
data = await self._state.http.start_thread_with_message(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user