【问题标题】:How to edit embed messages - discord.py如何编辑嵌入消息 - discord.py
【发布时间】:2020-03-17 01:24:11
【问题描述】:

如何在discord.py 中编辑嵌入?

我试过了

msg.edit(embed = embed) 

但它只是用

编辑消息
<discord.embeds.Embed object at 0x000001824D3F5A68>

【问题讨论】:

  • 请澄清您的问题,您要达到的目标,目前的结果是什么,是否有一些错误消息?
  • @vgalin 我正在尝试发送嵌入消息,然后每 1.5 秒编辑一次嵌入消息。它将消息编辑到 并继续编辑 message

标签: python discord discord.py


【解决方案1】:

您应该能够像这样编辑给定消息的嵌入:

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)

【讨论】:

    猜你喜欢
    • 2021-08-31
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    • 2021-05-14
    • 2021-03-19
    • 1970-01-01
    • 2021-12-29
    相关资源
    最近更新 更多