![](/img/trans.png)
[英]How to use dtype argument in Panda's from_dict (Python)
[英]How to use the from_dict function in Embed messages?
我想發出命令!say [json]
發送嵌入消息。 我在discordpy.readthedocs中找到了from_dict函數。
現在,我不知道如何使用它。 希望對您有所幫助。
對不起,Google翻譯:3
談論這個 ?
因此,這是從字典中嵌入的,下面是一個示例:
@bot.command()
async def embed(ctx, *,title):
e=discord.Embed.from_dict({
"title":f"{title}",
"description":"This is the embed description"
})
await ctx.send(embed=e)
查看該圖像中的輸出
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.