Member-only story
Tutorial | Python | Discord.py
Send an Embed with a Discord Bot in Python
Upgrade your bot’s messages and make them a little more custom using embeds!

When your Discord bot responds to your server, you don’t always want a boring default message to be sent back. Maybe you have links or images that you want to send back in chat. With Python and Discord.py, this is super easy to do in your Discord bot!
Note: This is tested on version 1.4.1 of the Discord.py module. You will encounter issues if you are using a version lower than 1.0. It is recommended that you migrate your code to a more current version.
Building Embeds
Embeds in Discord are simple and have a very clean, formatted look to them. In this tutorial we will go through how to create an embed and customize every part of it.
The embed below is similar to what we will be making. It has a lot going on. There are multiple pictures, links, and text fields that we are able to edit.

Creating the Initial Embed

When creating an embed, you need to initialize an embed object using the Embed()
function from the discord
package. We will be using 4 arguments to get started:
title
: a string to set the title. This is the first line on our blank embedurl
: a string to set the link for the title. When you click ontitle
in the final embed it will take you to this linkdescription
: a string to set the description. This is the darker 2 red lines abovecolor
: a color object. This will color…