Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
508 B
1
Indexable
Never
import requests
import json

webhook_url = 'https://discord.com/api/webhooks/1182682821324701808/8Ug1JjRUxQMPETx4QGaZvmysBHS3XwUJxbBt4qag4Jghg6dM1vEAYXsHHhiMI8FjsXmy'

data = {
    'content': 'test'
}

headers = {
    'Content-Type': 'application/json'
}

response = requests.post(webhook_url, data=json.dumps(data), headers=headers)

if response.status_code == 204:
    print("Başarıyla webhook'a mesaj gönderildi.")
else:
    print(f"Hata oluştu, status code: {response.status_code}")
Leave a Comment