Could someone give me an example to make an Embed Message? #6523
-
Hello! Well, I'm new to python and I don't know the truth much, so I'm trying to make a discord bot with python, and I can't find any example of the Embed Message that works for me, since it throws an error or it doesn't work ... |
Beta Was this translation helpful? Give feedback.
Answered by
AbstractUmbra
Mar 12, 2021
Replies: 1 comment 1 reply
-
You can construct an Embed by setting the attributes listed on the docs for them. A brief example is here: embed = discord.Embed(url="https://www.google.com/", title="Google", colour=discord.Colour.default())
embed.add_field(name="Field 1", value="Value 1")
embed.add_field(name="Field 2", value="Value 2")
embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text="This is a footer.")
await channel.send(embed=embed) The example above looks like this. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Rapptz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can construct an Embed by setting the attributes listed on the docs for them.
A brief example is here:
The example above looks like this.
This is but a small example of an embed. There are more things you can set and use, so I recommend experimenting with them.