Skip to main content

Easily build Discord Embed dictionaries

Project description

embed_builder

I got tired of manually writing dictionaries to send embeds via Discord webhooks so I made this package to do it effortlessly.

This package was developed on Python 3.10.x but has not been tested on earlier versions. If you happen to successfully use this package on an older version then do let me know.

Installation

$ pip install embed-builder

Usage

from embed_builder import Embed

embed = Embed()
embed.set_title("Hello")
embed.set_description("How are you?")
my_embed = embed.build()

# Or via chaining...

my_embed = Embed().set_title("Hello").set_description("How are you?").build()

# Example usage with Discord webhooks and requests package

requests.post("webhook url", json={
    "content": "here is an embed",
    "embeds": [my_embed]
})

Warning Discord's embed total character limit is not currently enforced through this package. Make sure your content is the correct size as you are building embeds.

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

embed-builder-1.0.4.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file embed-builder-1.0.4.tar.gz.

File metadata

  • Download URL: embed-builder-1.0.4.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for embed-builder-1.0.4.tar.gz
Algorithm Hash digest
SHA256 9e6d79e2f06c818eaf1bd7843b17ebaff6cab9effea581490e992f82805e47ab
MD5 d9880a703f332ce9d40f2f5ce9c3bd11
BLAKE2b-256 5135c5691dd9fc94a565796b0bbee65155726d62b0db1f3b691e575988e99739

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