@@ -621,6 +621,7 @@ def handle_message_parameters(
621
621
embed : Embed | None = MISSING ,
622
622
embeds : list [Embed ] = MISSING ,
623
623
view : View | None = MISSING ,
624
+ applied_tags : list [Snowflake ] = MISSING ,
624
625
allowed_mentions : AllowedMentions | None = MISSING ,
625
626
previous_allowed_mentions : AllowedMentions | None = None ,
626
627
suppress : bool = False ,
@@ -654,6 +655,9 @@ def handle_message_parameters(
654
655
flags = MessageFlags (suppress_embeds = suppress , ephemeral = ephemeral )
655
656
payload ["flags" ] = flags .value
656
657
658
+ if applied_tags is not MISSING :
659
+ payload ["applied_tags" ] = applied_tags
660
+
657
661
if allowed_mentions :
658
662
if previous_allowed_mentions is not None :
659
663
payload ["allowed_mentions" ] = previous_allowed_mentions .merge (
@@ -1566,6 +1570,7 @@ async def send(
1566
1570
view : View = MISSING ,
1567
1571
thread : Snowflake = MISSING ,
1568
1572
thread_name : str | None = None ,
1573
+ applied_tags : list [Snowflake ] = MISSING ,
1569
1574
wait : Literal [True ],
1570
1575
delete_after : float = None ,
1571
1576
) -> WebhookMessage :
@@ -1588,6 +1593,7 @@ async def send(
1588
1593
view : View = MISSING ,
1589
1594
thread : Snowflake = MISSING ,
1590
1595
thread_name : str | None = None ,
1596
+ applied_tags : list [Snowflake ] = MISSING ,
1591
1597
wait : Literal [False ] = ...,
1592
1598
delete_after : float = None ,
1593
1599
) -> None :
@@ -1609,6 +1615,7 @@ async def send(
1609
1615
view : View = MISSING ,
1610
1616
thread : Snowflake = MISSING ,
1611
1617
thread_name : str | None = None ,
1618
+ applied_tags : list [Snowflake ] = MISSING ,
1612
1619
wait : bool = False ,
1613
1620
delete_after : float = None ,
1614
1621
) -> WebhookMessage | None :
@@ -1680,6 +1687,10 @@ async def send(
1680
1687
The name of the thread to create. Only works for forum channels.
1681
1688
1682
1689
.. versionadded:: 2.0
1690
+ applied_tags: List[:class:`Snowflake`]
1691
+ A list of tags to apply to the message. Only works for threads.
1692
+
1693
+ .. versionadded:: 2.5
1683
1694
delete_after: :class:`float`
1684
1695
If provided, the number of seconds to wait in the background
1685
1696
before deleting the message we just sent.
@@ -1704,7 +1715,8 @@ async def send(
1704
1715
InvalidArgument
1705
1716
Either there was no token associated with this webhook, ``ephemeral`` was passed
1706
1717
with the improper webhook type, there was no state attached with this webhook when
1707
- giving it a view, or you specified both ``thread_name`` and ``thread``.
1718
+ giving it a view, you specified both ``thread_name`` and ``thread``, or ``applied_tags``
1719
+ was passed with neither ``thread_name`` nor ``thread`` specified.
1708
1720
"""
1709
1721
1710
1722
if self .token is None :
@@ -1721,6 +1733,9 @@ async def send(
1721
1733
if thread and thread_name :
1722
1734
raise InvalidArgument ("You cannot specify both a thread and thread_name" )
1723
1735
1736
+ if applied_tags and not (thread or thread_name ):
1737
+ raise InvalidArgument ("You cannot specify applied_tags without a thread" )
1738
+
1724
1739
application_webhook = self .type is WebhookType .application
1725
1740
if ephemeral and not application_webhook :
1726
1741
raise InvalidArgument (
@@ -1749,6 +1764,7 @@ async def send(
1749
1764
embeds = embeds ,
1750
1765
ephemeral = ephemeral ,
1751
1766
view = view ,
1767
+ applied_tags = applied_tags ,
1752
1768
allowed_mentions = allowed_mentions ,
1753
1769
previous_allowed_mentions = previous_mentions ,
1754
1770
)
0 commit comments