File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ pip install discord-webhook
1818* [ Basic Webhook] ( #basic-webhook )
1919* [ Create Multiple Instances / Use multiple URLs] ( #create-multiple-instances )
2020* [ Get Webhook by ID] ( #get-webhook-by-id )
21+ * [ Send Webhook to thread] ( #send-webhook-to-thread )
2122* [ Manage Being Rate Limited] ( #manage-being-rate-limited )
2223* [ Embedded Content] ( #webhook-with-embedded-content )
2324* [ Edit Webhook Message] ( #edit-webhook-messages )
@@ -61,6 +62,19 @@ webhook = DiscordWebhook(url="your webhook url", id="your webhook message id")
6162# now you could delete or edit the webhook
6263# ...
6364````
65+ ### Send Webhook to thread
66+ You can send a message to an existing thread by setting ` thread_id ` or create a new thread in a forum channel by using a ` thread_name ` .
67+ ``` python
68+ from discord_webhook import DiscordWebhook
69+
70+ # send to an existing thread
71+ webhook = DiscordWebhook(url = " your webhook url" , thread_id = " the thread id" )
72+ webhook.execute()
73+
74+ # create a new thread in a forum channel
75+ webhook = DiscordWebhook(url = " your webhook url" , thread_name = " some-thread-name" )
76+ webhook.execute()
77+ ```
6478
6579### Manage being Rate Limited
6680
You can’t perform that action at this time.
0 commit comments