Last active
November 12, 2018 00:24
-
-
Save burrwebb/79bfcec3c8ed624653031591992e5d23 to your computer and use it in GitHub Desktop.
Python Discord webhook example
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 | |
import json | |
webhook = 'https://discordapp.com/api/blah/blah' | |
header = { | |
"content-type": "application/json" | |
} | |
body = { | |
"username": "Notification Bot", | |
"content": "This is an example of content.", | |
"embeds": [{ | |
"title": "This is the Embed Title", | |
"description": "This is a example of a description." | |
}] | |
} | |
requests.post(webhook, headers=header, data=json.dumps(body)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment