Skip to main content

A discord webhook client written in Python.

Project description

DiscordWebhook

A discord webhook client written in Python.

Example

from core import WebhookClient, Embed
import datetime

client = WebhookClient(
    webhook_url="HOOK_URL",
    username="github.com/elijahgives",
    avatar_url="https://cdn.discordapp.com/attachments/906585612663009314/906624383152431234/gift-gif.gif"
        )

embed = Embed(
    title='Hello, world.',
    description='This is a test embed from DiscordWebhook by ElijahGives.',
    timestamp=datetime.datetime.utcnow()
)
embed.add_field(name='Field #1', value="Description for `Field #1`.")
embed.add_field(name='Field #2', value="Description for `Field #2`.")
embed.set_image(url="https://cdn.discordapp.com/attachments/906585612663009314/906624383152431234/gift-gif.gif")

client.send('Hello world', embeds=[embed])

Credits

https://github.com/rapptz/discord.py for the Embed structure.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webhook_client-1.0.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file webhook_client-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: webhook_client-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.0.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.8

File hashes

Hashes for webhook_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 072c91ffe2b0d02c0006b35c1d8726f104505dac96e6c2187056d35906127f9d
MD5 73e7f4f61776015e034269dd89311598
BLAKE2b-256 c4ab2f3306d1dfbd600803e9e8f0cb23ddd2519bf0f45bdbe956e49c8a7503f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page