discordbots

Discord thread webhook


I got the webhook from Server > Settings > Integrations. But with the provided documentation by Discord I only can reply in channel.

import requests
url = 'webhook_url'

data = {
    "content": "Test"
}
result = requests.post(url, json=data)
print(result.json())

Is there any way to to reply in Thread directly? using some Thread ID or smth.


Solution

  • Looks like you have just to add thread_id as the query param in the webhook url. instead of in the post body.