@bot.event
async def on_message(message):
embed = discord.Embed(
title = "anything",
description = f"كت تويت : \n {message.content} \n ||@here||"
)
if message.channel.id == 927235996158922802:
channelO = await bot.fetch_channel(926945495413301290)
await channelO.send(embed)
In this code, the bot sends me this text message <discord.embeds.Embed object at 0x0000019E83E31D80> instead of the embed. There are no errors.
>Solution :
Change your last line to:
await channelO.send(embed=embed)
It’s happening because when you don’t add argument embed=, files=, etc. it automatically takes it as content= which is for text messages. So, discord.py converts your embed to string and sends it like a text message.