I'm creating a bot that allows users to create embedded messages. Here is a command that I am working with:
@bot.command()
async def embed(ctx,title_str,text_str,url_str):
embed=discord.Embed(title=title_str, url=url_str, description=text_str, color=0xFF5733)
await ctx.send(embed=embed)
This works fine, but if a video is linked I'd like it to add a preview image - in the same way it does if you post a Youtube link I tried adding image = video_url to the discord.Embed command, but this did not help.
Clearly discord is able to do this because when you type in a url to a video you get a preview in an embed automatically generated.
question from:
https://stackoverflow.com/questions/65830723/how-do-you-create-a-discord-bot-that-creates-embeds-which-contain-previews-of-vi 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…