如何编辑嵌入邮件-discord.py

如何编辑discord.py中的嵌入内容?

我尝试过

msg.edit(embed = embed) 

但是它只是使用

来编辑消息
<discord.embeds.Embed object at 0x000001824D3F5A68>
jjj0716 回答:如何编辑嵌入邮件-discord.py

要为已给出的消息提供另一种答案,您应该能够像这样编辑给定消息的嵌入内容:

from discord import Embed

...

first_embed = Embed(title='embed 1')
new_embed = Embed(title='embed 2')

# send a first message with an embed
msg = await ctx.send(embed=first_embed)

# edit the embed of the message
await msg.edit(embed=new_embed)
,

您可以改用它:

AssertionError: input contains *: object tested must be an array,a
      map,an object,a set,a string,or a weakset,but undefined given

对于您的问题,您可以将不同的嵌入内容存储在不同的变量中(例如await client.edit_message(msg,embed = embed) var1等),每隔1.5秒(使用var2,{ {1}}等)

因此您的命令应如下所示:

embed = var1

我希望这能回答您的问题!

本文链接:https://www.f2er.com/3060144.html

大家都在问