class View(nextcord.ui.View):
@bot.command(aliases = [ 'рейд', 'рэйд', 'Рэйд'])
@commands.has_permissions(manage_messages = True)
async def Рейд(ctx, amount, date, time, *, arg):
ban_one = CustomButtonMenuPages(source=MySource(ban))
pon_two = CustomButtonMenuPages(source=MySource(pon))
emb = nextcord.Embed(title= f'Склеп огромного камня\nДата {date} Время {time} ', colour=nextcord.Color.blue())
emb.add_field(name= f'Участники:', value= '1\n2\n3\n4\n5\n6\n7')
emb.add_field(name= f'Возможно пойду:', value= '1\n2\n3\n4\n5\n6\n7')
emb.set_image(url = 'https://demotivation.ru/wp-content/uploads/2020/05/devushka-krasivaya-lico-golubye-1536x1024.jpg')
msg = await ctx.send(embed=emb)
emb = msg.embeds[0]
await msg.edit(embed=emb, view=View())
class View(nextcord.ui.View):
@nextcord.ui.button(label="Подписаться",style=nextcord.ButtonStyle.blurple) # or .primary
async def blurple_button(self,button:nextcord.ui.Button,interaction:nextcord.Interaction):
button.disabled=True
await interaction.response.edit_message(view=self)
@nextcord.ui.button(label="Отписка",style=nextcord.ButtonStyle.green)
async def green_button(self,button:nextcord.ui.Button,interaction:nextcord.Interaction):
button.disabled=True
await interaction.response.edit_message(view=self)
class View(nextcord.ui.View):
@nextcord.ui.button(label="Возможно пойду",style=nextcord.ButtonStyle.gray)
async def gray_button(ctx,interaction:nextcord.Interaction,button:nextcord.ui.Button):
button.disabled=True
j = interaction.message.embeds[0]
emb = nextcord.Embed(title= f'Склеп огромного камня\nДата Время ', colour=nextcord.Color.blue())
msg = await ctx.send(embed=emb)
emb = msg.embeds[0]
await msg.edit(embed=emb, view=View())
У меня есть вот такой код, понимаю что он очень плох, но все же. Я хочу сделать так, чтоб при нажатии на кнопку Подписаться в эмбед сообщении напротив цифры 1 возникал ник человека, который нажал на кнопку, но я вроде понимаю, что в текущем состоянии кода невозможно это сделать.