> For the complete documentation index, see [llms.txt](https://brucecodes.gitbook.io/pycord/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brucecodes.gitbook.io/pycord/guide/basic-features/embeds.md).

# Embeds

Making and using embeds with Py-cord

![This is how embeds look like!](https://2961845821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjPk-Yu4sOq8KGrr_yG%2F-MjmZV6mCRB0M5Ln9snc%2F-Mjm_7ULHG8Zme3cokXh%2Fimage.png?alt=media\&token=42897d4d-b4cc-443f-9d16-81d51b791a6e)

Embeds can make your bot's messages look a lot cooler. It also has other purposes, like fending off imposers - for example, people used to impersonate Dank Memer and trick users into giving them their items. Seeing this, the developers decided to use embeds - since embeds can only be sent by bots and webhooks, no users could impersonate any longer.

So, its clear that embeds are pretty nice. Adding them is simple enough too!

```python
import discord # make sure you install py-cord - read the Home Page
from discord.ext import commands # will be discussed later
import os

bot = commands.Bot(command_prefix='!', case_insensitive=True)

@bot.event
async def on_ready():
    print(f"{bot.user} is ready and online!")

@bot.command()
async def hello(ctx):
    await ctx.send("Hey!")
    
### Embed Command ###

@bot.command()
async def embed(ctx):
    embed = discord.Embed(title="How to make embeds with Py-cord", description="This tutorial will show you how to make embeds in py-cord. Simple enough, so lets get started!", color = discord.Color.from_rbg(255, 255, 255))
    await ctx.send(embed = embed)

bot.run(os.getenv('TOKEN'))
```

That simple! Lets now add fields, footers and other cool stuff!

{% tabs %}
{% tab title="Fields" %}

```python
@bot.command()
async def embed(ctx):
    embed = discord.Embed(title="How to make embeds with Py-cord", description="This tutorial will show you how to make embeds in py-cord. Simple enough, so lets get started!", color = discord.Color.from_rbg(255, 255, 255))
    embed.add_field(name="With Inline", value="This is what I would look like with inline", inline=True)
    embed.add_field(name="With Inline", value="This is what I would look like with inline", inline=True)
    embed.add_field(name="With Inline", value="This is what I would look like with inline", inline=True)
    embed.add_field(name="Without Inline", value="This is what I would look like without inline", inline=False)
    embed.add_field(name="Without Inline", value="This is what I would look like without inline", inline=False)
    await ctx.send(embed = embed)
```

![Embeds with fields](https://2961845821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjPk-Yu4sOq8KGrr_yG%2F-MjmZV6mCRB0M5Ln9snc%2F-Mjmbc0x5oXwtqS-43f4%2Fimage.png?alt=media\&token=07cb472f-772a-41c2-8cd7-cc5414457bc8)
{% endtab %}

{% tab title="Author and Footer" %}

```python
@bot.command()
async def embed(ctx):
    embed = discord.Embed(title="How to make embeds with Py-cord", description="This tutorial will show you how to make embeds in py-cord. Simple enough, so lets get started!", color = discord.Color.from_rbg(255, 255, 255), url="...")
    embed.add_field(name="With Inline", value="This is what I would look like with inline", inline=True)
    embed.add_field(name="With Inline", value="This is what I would look like with inline", inline=True)
    embed.add_field(name="With Inline", value="This is what I would look like with inline", inline=True)
    embed.add_field(name="Without Inline", value="This is what I would look like without inline", inline=False)
    embed.add_field(name="Without Inline", value="This is what I would look like without inline", inline=False)
    
    embed.set_footer(text="...", icon_url="...")
    embed.set_author(name="Pycord Guide", icon_url='...', url="...")
     
    await ctx.send(embed = embed)
    embed.set_footer(..., icon_url=ctx.author.avatar_url)
```

![](https://2961845821-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MjPk-Yu4sOq8KGrr_yG%2F-Mjmbh6S0S_0sZYn0bTN%2F-Mjmdb0_cBWMauQtJGPe%2Fimage.png?alt=media\&token=f9263004-7596-4acb-818d-3a797b9963b5)
{% endtab %}
{% endtabs %}

You may read the docs for more info - <https://pycord.readthedocs.io/en/master/api.html#discord.Embed>
