⚠️ Be Aware
There are cloned, forked, or unofficial versions of this repository circulating online that contain malware and may compromise your system. This repository is the official source, as verified by its complete commit history, active maintenance, and updates directly from the original author.
If you are unsure whether you're using the correct version, always refer to:
👉 Official Repository
Using unofficial or outdated copies may result in missing features, bugs, or security issues not present in the official version.
DO NOT download any .zip files from unofficial sources!
This library is officially published on PyPi — installing via PyPi is the preferred and safest way to acquire it.
SimpleHook
SimpleHook is a minimalistic Python wrapper for Discord webhooks. It allows you to easily send messages, files, and embedded content to a Discord channel using just a few lines of code.
🔧 Features
- Send plain text messages
- Customize username and avatar
- Mention users or everyone/here
- Use text-to-speech
- Use embeds
- Upload files and images
- Create and send polls
🚀 Usage
Import and setup
from simplehook import SimpleHook # or from simplehook import SimpleHookAsync
# Initialize with your webhook URL
hook = SimpleHook("https://discord.com/api/webhooks/your_webhook_url")
# or
hook = SimpleHookAsync("https://discord.com/api/webhooks/your_webhook_url")
Core functions
# Send a simple message
hook.send_message("Hello, world!")
# Send a file
hook.send_file("example.txt")
# Send a message with a custom username, avatar, and text-to-speech
hook.send_customized_message(
message="I'm a bot!",
username="CoolBot",
avatar_url="https://i.imgur.com/your_avatar.png",
tts=True
)
# Mention a user by ID or everyone/here
hook.send_customized_message(message="Look here!", mention="123456789012345678") # user mention
hook.send_customized_message(message="Attention!", mention="everyone") # @everyone
Embed functions
# Send embedded files (max 10)
hook.send_embedded_files(paths=["img1.png", "img2.jpg"], message="Check these out!", color=53231)
# Send embedded message
hook.send_embedded_message(title="Hello!", color=321)
# Send embedded author message
hook.send_embedded_author(name="Paul", avatar_url="https://i.imgur.com/your_avatar.png")
# Send embedded URL with a custom title
hook.send_embedded_url(title="Google!", url="https://www.google.com")
# Send embedded image from the web
hook.send_embedded_url_image(url="https://i.imgur.com/your_image.png")
# Send embed message with multiple fields
hook.send_embedded_field(names=["Username", "Score"], values=["Player", "150"], inline=[True, True])
Poll function
# Create and send a poll
hook.create_poll(
question="What's your favorite color?",
answers=["Blue", "Red", "Green"],
emojis=["🔵", "🔴", "🟢"],
duration=48,
allow_multiselect=True
)
📦 Installation
pip install simplehook
Metadata
Release files for simplehook 1.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simplehook-1.4.4.tar.gz | 106.9 kB | Without provenance | Details for simplehook-1.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simplehook-1.4.4-py3-none-any.whl | Python 3 | none | any | Details for simplehook-1.4.4-py3-none-any.whl |
Total release size: 219.1 kB
Release files / simplehook-1.4.4.tar.gz
| Download URL | simplehook-1.4.4.tar.gz |
|---|---|
| Size | 106.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a756e94f5aaa25031ab76557bd5b8264a5280585025e1e5b822c161c8024452
|
|
BLAKE2b-256 checksum How to use checksums |
8905dca9a9b26fe5421a8dd73a5ba0121d245c7d1fab5cbe2f13955a5ed083ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / simplehook-1.4.4-py3-none-any.whl
| Download URL | simplehook-1.4.4-py3-none-any.whl |
|---|---|
| Size | 112.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc8aedce2cccb586b0d354ada40f6998335d5a919947bd1d9c6062954408cf20
|
|
BLAKE2b-256 checksum How to use checksums |
8208c70a55344de9c9717c1063e64a5e7cefcde201d0e3991e7dd84de20d481b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for simplehook 1.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.