DISCLAIMER!
This package is only vaguely tested.
Installing
Python 3.6 or higher is required
other than that it's just as simple as
pip install discord.py-embed-wrapper
from embed_wrapper import *
Wrapper Classes - Examples/Usage
EmbedField
to create an EmbedField object
wrapped_field = EmbedField(name=field_name, value=field_value, inline=field_inline)
and then use it in the initialisation of an EmbedWrapper
EmbedWrapper
embed_wrapper = EmbedWrapper(
author_name=author_name, author_url=author_url, author_icon_url=author_icon_url,
embed_type=embed_type, title=title, url=url, color=color, description=description,
timestamp=timestamp,
footer_text=footer_text, footer_icon_url=footer_icon_url,
image_url=image_url, thumbnail_url=thumbnail_url,
fields=[wrapped_field]
)
to finalize and instantiate the embed from the wrapper call
embed = embed_wrapper.embed
Helper Functions - Examples/Usage
embeds_from_message
Creates a List of Embeds from a give Message. Returns None if the given Message didn't have any Embeds.
def embeds_from_message(message: Message) -> Optional[List[Embed]]:
...
embeds = embeds_from_message(message=message)
send_embed_message
Sends a Message including an Embed to either a Guild TextChannel or a DMChannel and returns the sent Message.
async def send_embed_message(
embed: Embed,
invoking_message: Message,
as_reply: bool = False,
as_dm: bool = False,
dm_channel: DMChannel = None,
pin: bool = False,
message_content: str = "",
reactions: List[str] = None,
mentions: List[Union[User, Member, Role]] = None,
append_mentions: bool = False
) -> Message:
...
simplest usage
embed_message = await send_embed_message(embed=embed, invoking_message=message)
Sends an Embed Message only containing the embed in the same channel it was invoked.
edit_embed_message
Edits a given Embed Message with a new Embed and optionally new Message Content and returns the edited Message. Pass None as the Embed to remove it.
async def edit_embed_message(
embed: Embed,
message: Message,
message_content: Optional[str],
) -> Message:
...
usage
embed_message = await edit_embed_message(embed=embed, message=embed_message)
Metadata
Release files for discord.py-embed-wrapper 0.0.9
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 |
|---|---|---|---|---|
| discord.py-embed-wrapper-0.0.9.tar.gz | 4.5 kB | Without provenance | Details for discord.py-embed-wrapper-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| discord.py_embed_wrapper-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for discord.py_embed_wrapper-0.0.9-py3-none-any.whl |
Total release size: 10.9 kB
Release files / discord.py-embed-wrapper-0.0.9.tar.gz
| Download URL | discord.py-embed-wrapper-0.0.9.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95c3e9511de5759cec6a38327e9bd724e7ec029dfb7dec9da4d2b0f13a0744da
|
|
BLAKE2b-256 checksum How to use checksums |
f68d177b22211b6edc047b8b4a9fd37e0f005b16358455e38a7e604186f2c797
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.3
|
Release files / discord.py_embed_wrapper-0.0.9-py3-none-any.whl
| Download URL | discord.py_embed_wrapper-0.0.9-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f14e7b5441f66de384a10efaabe559415828050e8b7f7fcf98446194b87711e5
|
|
BLAKE2b-256 checksum How to use checksums |
45d979b51e898fe220d8329a3f7ee822acc78e04f5c0b6f8156cab1df44bcd58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.3
|
Security for discord.py-embed-wrapper 0.0.9
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.