A Python 3 webhook module.
Project description
WhPy
Python 3 webhook module for interacting with various chat applications via established webhooks.
Installation
pip install WhPy
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()
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.0.3.tar.gz
(2.5 kB
view hashes)
Built Distribution
WhPy-0.0.3-py3-none-any.whl
(3.7 kB
view hashes)