A wrapper of discord.Embed.
Project description
sembed
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')
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')
Prerequisites
- Python 3.8 (Please make GitHub issue if you can use this lib on different python version)
- discord.py
License
Please see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
sembed-1.1.0-py3-none-any.whl
(4.7 kB
view hashes)