A Python 3 webhook module.
Project description
WhPy - Webhook Python
Webhook Python is a Python 3 module for interacting with various chat applications via established webhooks.
Installation
pip install WhPy
SHA256 CHECKSUMS
94b88b6c8af7e451d87be9a2e5b87982a6c671f35fb78e11573d8b3e8c65d2a9 dist/WhPy-0.1.2-py3-none-any.whl
67f6175a80c1211ead9e2452aa54396384f8ea6bb16d937aff63c79ed067fea5 dist/WhPy-0.1.2.tar.gz
29fecc82d25a71d9b3cd80c2bf4551e27c8b8e414c203b135b641fd4235d0c92 WhPy/discord.py
2004c330f131d71e4f3556f2ce3b737208403789a8e30314d67c702805b43def WhPy/__init__.py
Code Examples
Hello, World!
from WhPy import discord
# Discord Webhook URL
webhook_url = "https://discordapp.com/api/webhooks/1234/567890"
# Creates Discord Instance
hook = discord.Webhook(url=webhook_url)
# Sets Message Content
hook.message(content="Hello, World!")
# Executes the Webhook
hook.execute()
Hello, World! from user MichaelCduBois
from WhPy import discord
# Discord Webhook Parameters
webhook_channel_id = "1234"
webhook_token = "567890"
# Creates Discord Instance
hook = discord.Webhook(channel_id=webhook_channel_id, token=webhook_token)
# Sets Message Content as MichaelCduBois
hook.message(content="Hello, World!", username="MichaelCduBois")
#Executes the Webhook
hook.execute()
Hello, World! Text-to-Speech Message
from WhPy import discord
# Discord Webhook URL
webhook_url = "https://discordapp.com/api/webhooks/1234/567890"
# Creats Discord Instance
hook = discord.webhook(url=webhook_url)
# Sets Message content as a Text-to-Speech Message
hook.message(content="Hello, World!", tts=True)
# Executes the Webhook
hook.execute()
Return message confirmation as JSON Object
from WhPy import discord
# Discord Webhook URL
webhook_url = "https://discordapp.com/api/webhooks/1234/567890"
# Creats Discord Instance
hook = discord.webhook(url=webhook_url)
# Sets Message Content
hook.message(content="Hello, World!")
# Executes the Webhook
hook.execute(wait=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
WhPy-0.1.3.tar.gz
(3.6 kB
view hashes)
Built Distribution
WhPy-0.1.3-py3-none-any.whl
(4.8 kB
view hashes)