Last active
June 19, 2020 12:09
-
-
Save Core-commits/fa13bbc607982c167be4c257fb80870c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests #dependency | |
import json | |
url = "Discord webhook url here" | |
data = {} | |
data["content"] = input("__ Type here what you want the webhook to say OUT of the embed.\nChoco-Girl$ ") | |
data["username"] = "Username" | |
data["embeds"] = [] | |
embed = {} | |
embed["title"] = input("Title: ") | |
embed["description"] = input("Text: ") | |
data["embeds"].append(embed) | |
result = requests.post(url, data=json.dumps(data), headers={"Content-Type": "application/json"}) | |
try: | |
result.raise_for_status() | |
except requests.exceptions.HTTPError as err: | |
print(err) | |
else: | |
print("Post Sent with the code {}.".format(result.status_code)) | |
#result: https://i.imgur.com/DRqXQzA.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment