【发布时间】:2021-08-27 00:38:57
【问题描述】:
我怎样才能做到这一点,以便当提到的人按下一个按钮时,它会发送正下方的消息,而当我按下另一个按钮时它会发送另一个留言?
@bot.command()
async def Pancakes(ctx, user : discord.Member):
Pancakes=discord.Embed(title="Pancakes", description=f" **{ctx.author.mention} a offert des Pancakes à {user.mention} !**", color=0xFF5733)
image = random.choice([''])
Pancakes.set_image(url=image)
Pancakes.set_footer(text = random.choice(funFact))
Pancakes.set_thumbnail(url = "")
await ctx.send(embed=Pancakes)
components = [
[Button(style=ButtonStyle.gray, label = "Miam !"),
Button(style=ButtonStyle.gray, label = "Berk !")]
]
Message = await ctx.send(f'**{user.mention}, Do you accept his pancakes ?**', components=components)
【问题讨论】:
-
我亲爱的老兄,按钮 API 仍然是一个新概念,它有很多错误并且没有关于它的实际文档。你最好等待
discord.py2.0 -
好的,谢谢,但我们可以对反应做同样的事情吗?
-
是的,我们可以。唯一的尊重,而不是使用文字,你将不得不使用表情符号