如何编辑嵌入消息-discord.py [英] How to edit embed messages - discord.py

查看:88
本文介绍了如何编辑嵌入消息-discord.py的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

How do I edit an embed in discord.py?

我尝试过

msg.edit(embed = embed) 

但是它只是使用

<discord.embeds.Embed object at 0x000001824D3F5A68>

推荐答案

要为已给出的消息提供替代答案,您应该能够编辑给定消息的嵌入内容,如下所示:

To provide an alternative answer to the one already given, you should be able to edit an embed of a given message like this :

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)

这篇关于如何编辑嵌入消息-discord.py的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆