Skip to content

Instantly share code, notes, and snippets.

@burrwebb
Last active November 12, 2018 00:24
Show Gist options
  • Save burrwebb/79bfcec3c8ed624653031591992e5d23 to your computer and use it in GitHub Desktop.
Save burrwebb/79bfcec3c8ed624653031591992e5d23 to your computer and use it in GitHub Desktop.
Python Discord webhook example
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