首页 > 解决方案 > Discord.py 自我机器人

问题描述

我正在制作一个自我机器人,我想做点什么。我希望我的机器人阅读嵌入的描述,然后回复。

actual bot:
Field = "What color is the sky?" , Value = "1. Blue 2. Red 3. Pink"

Self Bot:
1. Blue

我不知道从哪里开始

标签: pythondiscord.py

解决方案


我不确定我是否完全理解你在说什么,因为这个例子很不清楚。我建议先阅读文档。但是,如果您想做的只是阅读嵌入字段,您可以试试这个

@client.event
async def on_message(message):
    embeds = message.embeds 
    for embed in embeds:
        print(embed.to_dict()) 

推荐阅读