Skip to main content

A discord webhook client written in Python.

Project description

DiscordWebhook

A discord webhook client written in Python.

Installation

pip install webhook-client

Example

from webhook_client 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 from embed!',
    description='Example embed from [webhook-client](https://github.com/elijahgives/webhook-client).',
    timestamp=datetime.datetime.utcnow()
)
embed.add_field(name='Field #1', value="Description for `Field #1`.")
embed.set_image(url="https://cdn.discordapp.com/attachments/906585612663009314/906624383152431234/gift-gif.gif")

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

License

Copyright (c) ElijahGives 2021 - Licensed under the GNU General Public License v3.

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 Distribution

webhook-client-1.0.2.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

webhook_client-1.0.2-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file webhook-client-1.0.2.tar.gz.

File metadata

  • Download URL: webhook-client-1.0.2.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • 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.2.tar.gz
Algorithm Hash digest
SHA256 43b8a7a29ecb69c34e1e61793a4b77040d604fd9661b5744f9b6928a33d24907
MD5 c93fa32b5b05798b0b66a871c4223586
BLAKE2b-256 d5fe55d384d8b72b3eef5ed3131f7460ce4bfae63bc3a645c36aa21f6c61bc1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: webhook_client-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a556767f5a7fd13b91f32a75ba9da5c5a1b973d6c1e278afc60ff9bb0ee59882
MD5 49d01da7babe2f32a297f431277ee829
BLAKE2b-256 40cf5eb8e7de0d6e8fb26f11a25345d2f024a109d4d6f83407e501194cc17e16

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