Не могу понять как мне передать автора в классе button, ctx.author для embed?
class Menu(discord.ui.View):
def __int__(self, ctx):
super().__init__()
self.value = None
@discord.ui.button(label='Открыть', style=discord.ButtonStyle.green)
async def menu1(self, interaction: discord.Interaction, button: discord.ui.Button):
rand = random.randint(1, 2)
rand = 1
if rand == 1:
emb = discord.Embed(title='.', color=discord.Color.from_rgb(49,49,49))
emb.set_image(url='https://cdn.discordapp.com/attachments/1040712944897499256/1040713936493887610/7.gif')
emb2 = discord.Embed(title='.', color=discord.Color.from_rgb(49, 49, 49))
emb2.set_image(url='https://cdn.discordapp.com/attachments/1040712944897499256/1040743333892477028/500_7_no.png')
await interaction.response.edit_message(embed=emb)
self.value = False
self.stop()
button.disabled = True
await asyncio.sleep(9)
await interaction.edit_original_response(embed=emb2)
@client.command(aliases=['open'])
async def _menu(ctx):
view = Menu()
await ctx.reply(view=view )