Easily using discord webhooks in python - asynchronous and synchronous - documented at https://discordwebhook.readthedocs.io/en/latest/
from discordwebhook import create # Import discordwebhook create webhook = create.Webhook("WEBHOOK_URL") # Create Webhook object, url can be in webhook.send() instead, however is reccomended here 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(embed=embed) #Send webhook to given link with the embed
Fixed asyncCreate not returning any valuesAdded error handling for invalid token in fetching webhooksAdded error handling for no provided urlAdded ability for setting webhook link prior to sending it, adding a link to the create.Webhook objectAdded alias discordwebhook.use for discordwebhook.create and discordwebhook.asyncUse for discordwebhook.asyncCreateMany changes to documentation and other things
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size discordwebhook.py-0.1.0.tar.gz (4.1 kB)||File type Source||Python version None||Upload date||Hashes View|