Reputation: 141
I wanna get all the embed content(including the image link), I tried this:
print(msg.embeds)
And that's returning:
[<discord.embeds.Embed object at 0x000002E48768CD30>]
[<discord.embeds.Embed object at 0x000002E48768CAF0>]
[<discord.embeds.Embed object at 0x000002E487F04040>]
[<discord.embeds.Embed object at 0x000002E48768CA60>]
[<discord.embeds.Embed object at 0x000002E48768C9D0>]
[<discord.embeds.Embed object at 0x000002E487F043A0>]
I cant find anything about that on the documentation, only about sending embeds.
Upvotes: 2
Views: 3553
Reputation: 4743
You're just getting embeds. According to API References, you can't get the whole embed content with one function like message.content
. You have to get it part by part like Embed.title
, Embed.description
and Embed.fields
.
Embed.fields
Returns a list ofEmbedProxy
denoting the field contents. See add_field() for possible values you can access. If the attribute has no value then Empty is returned.
So that means, you can get embed title, description, and fields' name and value. Here's a simple example for this:
embed = discord.Embed(title='Example', description='Embed')
embed.add_field(name='field 1 name', value='field 1 value')
embed.add_field(name='field 2 name', value='field 2 value')
embed.title # returns 'Example'
embed.description # returns 'Embed'
embed.fields # returns a list of fields
embed.fields[0].name # returns 'field 1 name'
embed.fields[0].value # returns 'field 1 value'
embed.fields[1].name # returns 'field 2 name'
embed.fields[1].value # returns 'field 2 value'
Upvotes: 3