Skip to main content

Easily using discord webhooks in python - asynchronous and synchronous - documented at https://discordwebhook.readthedocs.io/en/latest/

Project description

A simple python package for posting to discord webhooks in python
Has asynchronous and synchronous options

Example

from discordwebhook import create # Import discordwebhook create

webhook = create.Webhook() # Create Webhook object
embed = create.Embed() # Create embed object

webhook.username("Example Webhook") # Override webhook username as 'Example Webhook'
webhook.message("Hello! This is a message from an example webhook with the `discordwebhook.py` library!") # Message to go with the embed

embed.title("Github Logo") # Embed title as 'Github Logo'
embed.image(url="https://image.flaticon.com/icons/png/512/25/25231.png") # Embed image as github logo
embed.color(0x808080) # Gray embed color

webhook.send("WEBHOOK_URL", embed=embed) #Send webhook to given link with the embed

0.0.5 - 0.0.6 Changelog:

  • Changed how embed data is fetched, Embed().embed is no longer needed, only Embed() needs to be used
  • Fixed fatal errors with 0.0.5 in 0.0.6

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for discordwebhook.py, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size discordwebhook.py-0.0.6.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page