mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-08-30 06:55:35 +00:00
Add applied_tags to ForumChannel.create_thread to match Thread.edit
This commit is contained in:
parent
c83134ab65
commit
e04af033c0
@ -2462,6 +2462,7 @@ class ForumChannel(discord.abc.GuildChannel, Hashable):
|
|||||||
stickers: Sequence[Union[GuildSticker, StickerItem]] = MISSING,
|
stickers: Sequence[Union[GuildSticker, StickerItem]] = MISSING,
|
||||||
allowed_mentions: AllowedMentions = MISSING,
|
allowed_mentions: AllowedMentions = MISSING,
|
||||||
mention_author: bool = MISSING,
|
mention_author: bool = MISSING,
|
||||||
|
applied_tags: Sequence[ForumTag] = MISSING,
|
||||||
view: View = MISSING,
|
view: View = MISSING,
|
||||||
suppress_embeds: bool = False,
|
suppress_embeds: bool = False,
|
||||||
reason: Optional[str] = None,
|
reason: Optional[str] = None,
|
||||||
@ -2505,6 +2506,8 @@ class ForumChannel(discord.abc.GuildChannel, Hashable):
|
|||||||
are used instead.
|
are used instead.
|
||||||
mention_author: :class:`bool`
|
mention_author: :class:`bool`
|
||||||
If set, overrides the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions``.
|
If set, overrides the :attr:`~discord.AllowedMentions.replied_user` attribute of ``allowed_mentions``.
|
||||||
|
applied_tags: List[:class:`discord.ForumTag`]
|
||||||
|
A list of tags to apply to the thread.
|
||||||
view: :class:`discord.ui.View`
|
view: :class:`discord.ui.View`
|
||||||
A Discord UI View to add to the message.
|
A Discord UI View to add to the message.
|
||||||
stickers: Sequence[Union[:class:`~discord.GuildSticker`, :class:`~discord.StickerItem`]]
|
stickers: Sequence[Union[:class:`~discord.GuildSticker`, :class:`~discord.StickerItem`]]
|
||||||
@ -2559,6 +2562,9 @@ class ForumChannel(discord.abc.GuildChannel, Hashable):
|
|||||||
'type': 11, # Private threads don't seem to be allowed
|
'type': 11, # Private threads don't seem to be allowed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if applied_tags is not MISSING:
|
||||||
|
channel_payload['applied_tags'] = [str(tag.id) for tag in applied_tags]
|
||||||
|
|
||||||
with handle_message_parameters(
|
with handle_message_parameters(
|
||||||
content=content,
|
content=content,
|
||||||
tts=tts,
|
tts=tts,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user