Tomdzsó
Tomdzsó

Reputation: 25

Discord.py get message embed

How can I get the embed of a message to a variable with the ID of the message in discord.py? I get the message with uzenet = await client.get_message(channel, id), but I don't know how to get it's embed.

Upvotes: 1

Views: 8266

Answers (2)

PaxxPatriot
PaxxPatriot

Reputation: 116

To get the first Embed of your message, as you said that would be a dict(): embedFromMessage = uzenet.embeds[0]

To transfer the dict() into an discord.Embed object: embed = discord.Embed.from_data(embedFromMessage)

Upvotes: 5

Patrick Haugh
Patrick Haugh

Reputation: 60944

You can get a list of Embed objects with uzenet.embeds

Upvotes: 2

Related Questions