<gh_stars>0
import requests

url = "https://discord.com/api/webhooks/<KEY>"

def notify(message):

    data = {
        "content": "Tweet Posted: "+message,

    }

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

    result = requests.post(url, json=data, headers=headers)
    if 200 <= result.status_code < 300:
        print(f"Webhook sent {result.status_code}")
    else:
        print(f"Not sent with {result.status_code}, response:\n{result.json()}")

import requests

url = "https://discord.com/api/webhooks/<KEY>"

def notify(message):

    data = {
        "content": "Tweet Posted: "+message,

    }

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

    result = requests.post(url, json=data, headers=headers)
    if 200 <= result.status_code < 300:
        print(f"Webhook sent {result.status_code}")
    else:
        print(f"Not sent with {result.status_code}, response:\n{result.json()}")