[英]Is there a way to embed this discord message discord bot python
我一直在努力嵌入這條消息,它目前從 python 項目的路徑中獲取圖像並發送它們,但我想像這樣嵌入它們:
標題是圖像:描述是享受! 並且彩色側欄為紅色
當前代碼:
@client.command()
async def image(channel):
file = random.choice(files)
await channel.send(file=discord.File(file))
在簡單地詢問要做什么之前,您需要閱讀有關嵌入的更多信息。
@client.command()
async def image(channel):
file = random.choice(files)
embed = discord.Embed(title="", description="Enjoy!", color=discord.Color.red())
embed.set_image(url=file)
await channel.send(embed=embed)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.