async def knopka(ctx):
await ctx.send(
embed = discord.Embed(title = '**Открыть клад?**', timestamp = ctx.message.created_at),
components = [
Button(style = ButtonStyle.green, label = 'Да'),
Button(style = ButtonStyle.red, label = 'Нет')
])
responce = await client.wait_for('button_click', check = lambda message: message.author == ctx.author)
if responce.channel == ctx.channel:
if responce.component.label == 'Да':
await responce.respond(content = 'Недоступно')
else:
await responce.respond(content = 'Ты нажал на Нет?')
@client.command()