Skip to main content

sembed

PyPi PyPI - Downloads readthedocs
This is a wrapper of discord.Embed of discord.py.


Installation

Run this:

pip install sembed

Basic Usage

Simple Embed

import discord
import sembed

client = discord.Client()

@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client))

@client.event
async def on_message(message):
    if message.author == client.user:
        return

    if message.content == "please test sembed":
        e = sembed.SEmbed("Did you know that:", "This embed is made by sembed!")
        await message.channel.send(embed=e)

client.run('your token here')

simple_embed

All-in-one Embed

import discord
import sembed

client = discord.Client()


@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client))


@client.event
async def on_message(message):
    if message.author == client.user:
        return

    if message.content == "please test sembed":
        e = sembed.SEmbed(title="Title", description="Description", color=0x7289da,
                        fields=[sembed.SField("name1", "value1 - inline", True),
                                sembed.SField("name2", "value2 - inline", True),
                                sembed.SField("name3", "value3 - not inline", False)],
                        author=sembed.SAuthor("Author", "https://cdn.discordapp.com/avatars/686547120534454315/a_14261e094afcbfe4ab3abde42ac86987.gif", "https://discord.com"),
                        footer=sembed.SFooter("Footer", "https://cdn.discordapp.com/embed/avatars/2.png"),
                        url="https://github.com",
                        image_url="https://cdn.discordapp.com/embed/avatars/3.png",
                        thumbnail_url="https://cdn.discordapp.com/embed/avatars/0.png")

        await message.channel.send(embed=e)

client.run('your token here')

all_in_one_embed.png

Edit Embed

import discord
import sembed

client = discord.Client()


@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client))


@client.event
async def on_message(message):
    if message.author == client.user:
        return

    if message.content == "please test sembed":
        e = sembed.SEmbed(title="Title", description="Description")
        await message.channel.send(embed=e)
        e.author = sembed.SAuthor("You can use SAuthor.")
        e.footer = "And you can set str."
        e.fields.append(sembed.SField("But...", "You must set SField to fields :("))
        await message.channel.send(embed=e)
        e.author.name = "(Edited)"
        e.fields[0].value = "(Edited)"
        e.footer.text = "(Edited)"
        await message.channel.send(embed=e)

client.run('your token here')

edited_embed.png


Prerequisites

  • Python 3.8|3.9 (Please make GitHub issue if you can use this lib on different python version)
  • discord.py

License

Please see LICENSE.

Contributing

Contributing is welcome! https://github.com/sevenc-nanashi/sembed/pulls

Metadata

Release files for sembed 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for sembed 1.1.3
File Interpreter ABI Platform
sembed-1.1.3-py3-none-any.whl Python 3 none any Details

Release files / sembed-1.1.3-py3-none-any.whl

Download URL sembed-1.1.3-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3f0a555edf439a8c41d78d90f286aef1ea331af0cd674441f869d7976830d06
BLAKE2b-256 checksum
How to use checksums
f018f38c1800811b50cd3e3288751979ccc3f7059df61e0e8cd035a252e6a3e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release history Release notifications | RSS feed

This release

1.1.3 This release

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page