'Discord Bot can't find embeds in messages

I have a message with a single embed in it, when using

message.embeds

I get nothing back, the length of it is 0 and when printing the list there's nothing there. If I try to refer to anything in the list I get an out of range error, because there's nothing there obviously.

I can still read message content itself, if there is raw text there. So my question is, am I going about getting the embeds in the wrong way? If not, is there a way to just get the raw text of a message and sort of go around the embed?

Thank you!

Added below is a picture of one of the messages I am trying to read, as you can see it clearly has an embed :

enter image description here

For further context here is the full code

async def on_message(message):
      if message.channel.id in channels:
           print(str(message.embeds))
           #or any other reference to an embed in the message, none of the work


Solution 1:[1]

message.embeds returns a list of embeds in the message [docs]

To get the contents of the Embeds in the message, you could do:

embeds = message.embeds
for embed in embeds:
  print(embed.title)
  print(embed.description)

or this if there is only one embed in the message

embeds = message.embeds
embed = embeds[0]
print(embed.title)
print(embed.description)

Solution 2:[2]

I don't quite understand your question, maybe I'm just dumb, but it seems like your having a bit of a problem with embeds. Maybe if I show you an example you will understand.

@client.command()
async def Embed(ctx):
    embed=discord.Embed(title="Title")
    embed.add_field(name="Field Name", value="Field Text", inline=False)
    await ctx.send(embed=embed)  

I hope this helped, if you want to ask any further questions please feel free to comment on this message! Thanks,

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharman
Solution 2 DRags