import requests
import json


def Discord_webhook(keys, message):
    """
    Post a message to discord API via a Webhook.
    """

    url = keys['webhook_url']

    payload = {
        "content": message
    }

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

    response = requests.post(url, data=json.dumps(payload), headers=headers)
    return response