Skip to main content

Simple Discord webhook wrapper

Project description

SimpleHook

SimpleHook is a minimalistic Python wrapper for Discord webhooks. It allows you to easily send messages, files, and embedded images to a Discord channel using just a few lines of code.

PyPI Python License

🔧 Features

  • Send plain text messages
  • Customize username and avatar
  • Mention users or everyone/here
  • Upload files and images
  • Embed multiple images (up to 10)

🚀 Usage

from simplehook import SimpleHook

# Initialize with your webhook URL
hook = SimpleHook("https://discord.com/api/webhooks/your_webhook_url")

# Send a simple message
hook.send_message("Hello, world!")

# Send a message with a custom username and avatar
hook.send_customized_message(
    message="I'm a bot!",
    username="CoolBot",
    avatar_url="https://i.imgur.com/your_avatar.png"
)

# Mention a user by ID or everyone/here
hook.send_customized_message("Look here!", mention="123456789012345678")  # user mention
hook.send_customized_message("Attention!", mention="everyone")  # @everyone

# Send a file
hook.send_file("example.txt")

# Send embedded images (max 10)
hook.send_embedded_images(["img1.png", "img2.jpg"], message="Check these out!")

📦 Installation

pip install simplehook

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplehook-1.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplehook-1.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file simplehook-1.1.0.tar.gz.

File metadata

  • Download URL: simplehook-1.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for simplehook-1.1.0.tar.gz
Algorithm Hash digest
SHA256 432fd5a3ebde36dfaf6347cc4710653f78386b2ff06dcd2ac3a2024cab209934
MD5 081baa19ddca4dec9b8b9b0d6dd63ab7
BLAKE2b-256 79dbdc8ad54fe1c93f993105f5fb398e3fec7820e0558947ef66c5fc69e0b946

See more details on using hashes here.

File details

Details for the file simplehook-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: simplehook-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for simplehook-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a39016a16d728fc15892bd8090210acef941b5853af85d2ccff5f43e985a52d
MD5 885b60ddf85d026829b7e188d041be26
BLAKE2b-256 8b29eb26a6a1af60667dba9b278db83fb4a33c6b37a42d0890700cd6ccf5a663

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page