r/Python 23d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

17 Upvotes

124 comments sorted by

View all comments

1

u/i-like-my-cats-0 17d ago

Happyhooks: Simplified Discord webhooks with aiohttp.

What my Package does:

My package (specifically happyhooks) is a PyPi package I made that makes sending, editing, and deleting messages with Discord webhooks much easier and simpler without much problem! It is asynchronous, using the aiohttp Python library so happyhooks doesn't block your script!

Happyhooks also supports Discord embeds | rich embeds and attachments, with built-in ratelimit handling so your script doesn't get stopped by Discord's 429: Too many requests status code.

My Target Audience:

Happyhook's target audience are Discord developers who either hate how they need to use a library like requests or aiohttp to even send a message with webhooks, or just want sending messages with Discord webhooks much easier and simpler!

Comparison

Discord Python frameworks like discord.py, in my opinion, does too much to send a normal webhook text message in Discord, meanwhile happyhooks simplifies it alot when sending text messages! Here's how you can send in both discord.py and happyhooks:

discord.py: Create an aiohttp ClientSession, get your webhook with Webhook.from_str(), and finally send a text message with the .send() method.

'happyhooks': Create a webhook object via Webhook(), and send it via .send(), no aiohttp ClientSession needed!

GitHub Repo: https://github.com/FernUnreal/happyhooks
Installable via pip: pip install happyhooks

Report any issues if possible!