簡體   English   中英

如何獲得嵌入的 ID | Discord.py

[英]How I can get the ID of an embed | Discord.py

我創建了一個嵌入並希望在同一個 function 中獲取 ID:

embedVar = discord.Embed(title="TEXT", description="TEXT", color=0x00ff00)
embedVar.add_field(name="TEXT", inline=False)
embedVar.set_footer(text="TEXT")

await channel.send(embed=embedVar)

get ID of embedVar

現在我想獲取嵌入的 ID

你可以這樣做:

message = await channel.send(embed = embedVar)
id = message.id

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM