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.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

embed_builder-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file embed_builder-1.0.1.tar.gz.

File metadata

  • Download URL: embed_builder-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 8e5a7b8dbe78327e1db02f141911f49db63ed3c6160e231e7cfe95a361397efd
MD5 7c71d8b3ef75ccee69d51ebb3e1a4356
BLAKE2b-256 bfb52d406b7eb91ac53356a7630a7e14e9054ef786535e9d023d38dfaf6facbd

See more details on using hashes here.

File details

Details for the file embed_builder-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: embed_builder-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for embed_builder-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7dc0336114069d35d7382f17fc3d04d407dd820b7ab83332c6366b499ecc9ac8
MD5 a381d6909d46c9fd5a88cfaa5fe5b75e
BLAKE2b-256 1ec09aac6acb3740a2c04eb83377f3741dccd238294438a498c1888b8de99296

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