Happyhooks
Happyhooks is a Python package that simplifies interaction between Discord webhooks!
You can do things in this package such as:
- Send/Edit/Delete messages
- Create Discord embeds
- Send files/attachments too!
Happyhooks is also asynchronous, using the aiohttp Python library so this doesn't block your whole script, and lets you also use this in Python libraries like discord.py!
Usage Examples
Here are some quick examples on how you can use this package:
- Sending normal text messages:
import hphooks
# Assuming the rest is in an async function!
webhook = hphooks.Webhook('YOUR_WEBHOOK_URL')
await webhook.send('Hello world!') # Quick shortcut I made for basic text messages!
- Sending basic / rich Discord embeds:
import hphooks
webhook = hphooks.Webhook('YOUR_WEBHOOK_URL')
embed = hphooks.Embed(
title='My **COOL** embed😎',
description='This is my very cool embed😎😎',
color='COLOR_HEXCODE' # Defaults to #ffffff (White)!
)
rich_embed = hphooks.RichEmbed(
title='My **COOLER** embed😎',
url='https://example.com', # Adds a link that opens when you click the embed title!
description='This is my more cooler embed😎😎',
color='COLOR_HEXCODE'
)
rich_embed.set_footer('Happyhooks Rich Embed', icon_url='YOUR_IMAGE_URL')
rich_embed.set_author('Happyhooks', url='https://discord.com', icon_url='YOUR_IMAGE_URL')
rich_embed.add_field(
name='My field',
value='This is my field!',
inline=True
)
message = hphooks.Message('Look at my embeds!', embeds=[embed, rich_embed])
await webhook.send(message)
- Sending Discord attachments:
import hphooks
webhook = hphooks.Webhook('YOUR_WEBHOOK_URL')
example_image = hphooks.File(fp='your/image/file/path (will be pathlibbed)', filename='example.png')
message = hphooks.Message('Look at my image file!')
await webhook.send(message, files=[example_image])
- Editing / Deleting webhook messages:
import hphooks
import asyncio
webhook = hphooks.Webhook('YOUR_WEBHOOK_URL')
sentmessage = await webhook.send('Example') # This returns a SentMessage object, and it'll be very important here!
print('Sent first message, editing it in a few seconds..')
await asyncio.sleep(2.0)
await webhook.edit(sentmessage, 'Edited example!') # Shortcut for only editing the content itself too!
print('Edited message! Now deleting in a few seconds..')
await asyncio.sleep(2.0)
await webhook.delete(sentmessage) # Ofcourse, deletes the webhook message!
print('Deleted message!')
All coded by me, slightly debugged by AI
Release files for happyhooks 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| happyhooks-0.1.1.tar.gz | 104.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| happyhooks-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 113.4 kB
Release files / happyhooks-0.1.1.tar.gz
| Download URL | happyhooks-0.1.1.tar.gz |
|---|---|
| Size | 104.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79e67d3260c471a28edd104c56fc90c96cb6160ab72c6bff59d0508caa6fd633
|
|
BLAKE2b-256 checksum How to use checksums |
2e434dbb4b5ffdf6cc60dda9c3d018e1072dc463ad5008890033573b23333439
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.17.0 {"ci":null,"cpu":"AMD64","implementation":{"name":"CPython","version":"3.14.5"},"installer":{"name":"hatch","version":"1.17.0"},"openssl_version":"OpenSSL 3.0.20 7 Apr 2026","python":"3.14.5","system":{"name":"Windows","release":"10"}} HTTPX2/2.5.0
|
Release files / happyhooks-0.1.1-py3-none-any.whl
| Download URL | happyhooks-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba45aa2244c88290d5c10e9d0dffd98c7a290b53c180f6422920107530ff11cf
|
|
BLAKE2b-256 checksum How to use checksums |
e20317341d561adc229033f488945d94908e6b13dc5bfe03f0497a35a1a3d651
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.17.0 {"ci":null,"cpu":"AMD64","implementation":{"name":"CPython","version":"3.14.5"},"installer":{"name":"hatch","version":"1.17.0"},"openssl_version":"OpenSSL 3.0.20 7 Apr 2026","python":"3.14.5","system":{"name":"Windows","release":"10"}} HTTPX2/2.5.0
|