@@ -337,16 +337,12 @@ def execute_webhook(
337
337
multipart : list [dict [str , Any ]] | None = None ,
338
338
files : list [File ] | None = None ,
339
339
thread_id : int | None = None ,
340
- thread_name : str | None = None ,
341
340
wait : bool = False ,
342
341
) -> Response [MessagePayload | None ]:
343
342
params = {"wait" : int (wait )}
344
343
if thread_id :
345
344
params ["thread_id" ] = thread_id
346
345
347
- if thread_name :
348
- payload ["thread_name" ] = thread_name
349
-
350
346
route = Route (
351
347
"POST" ,
352
348
"/webhooks/{webhook_id}/{webhook_token}" ,
@@ -633,6 +629,7 @@ def handle_message_parameters(
633
629
allowed_mentions : AllowedMentions | None = MISSING ,
634
630
previous_allowed_mentions : AllowedMentions | None = None ,
635
631
suppress : bool = False ,
632
+ thread_name : str | None = None ,
636
633
) -> ExecuteWebhookParameters :
637
634
if files is not MISSING and file is not MISSING :
638
635
raise TypeError ("Cannot mix file and files keyword arguments." )
@@ -717,6 +714,9 @@ def handle_message_parameters(
717
714
718
715
payload ["flags" ] = flags .value
719
716
717
+ if thread_name :
718
+ payload ["thread_name" ] = thread_name
719
+
720
720
if multipart_files :
721
721
multipart .append ({"name" : "payload_json" , "value" : utils ._to_json (payload )})
722
722
payload = None
@@ -1808,6 +1808,7 @@ async def send(
1808
1808
applied_tags = applied_tags ,
1809
1809
allowed_mentions = allowed_mentions ,
1810
1810
previous_allowed_mentions = previous_mentions ,
1811
+ thread_name = thread_name ,
1811
1812
)
1812
1813
adapter = async_context .get ()
1813
1814
thread_id : int | None = None
@@ -1824,7 +1825,6 @@ async def send(
1824
1825
multipart = params .multipart ,
1825
1826
files = params .files ,
1826
1827
thread_id = thread_id ,
1827
- thread_name = thread_name ,
1828
1828
wait = wait ,
1829
1829
)
1830
1830
0 commit comments