Discord Bot 按钮消息

时间:2021-06-10 02:20:52

标签: python discord

我怎样才能做到当提到的人按下一个按钮时它会发送一条消息就在下面,而当我按下另一个按钮时它会发送另一个留言

enter image description here

@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)

0 个答案:

没有答案