我正在尝试将嵌入的照片发送给不和谐的人,并在其之前发送消息。我尝试了几件事,但似乎无法掌握。
if message.author == client.user:
return
elif message.content.startswith('!brando'):
embed = discord.Embed(title="", description="", color=0x32363c)
embed.set_image(url="embed IMAGEURLHERE.PNG")
await client.send_message(message.channel + embed=embed +"<@!368718923123456789>s photo!")
答案 0 :(得分:3)
再看看Client.send_message
文档。您需要分别为其提供参数destination
,content
和embed
,而不是将它们加在一起。
@client.event
async def on_message(message):
if message.author == client.user:
return
elif message.content.startswith('!brando'):
embed = discord.Embed(title="", description="", color=0x32363c)
embed.set_image(url="ImageUrl")
await client.send_message(message.channel, "<@!368718923123456789>s photo!", embed=embed)