Как мне изменить сообщение с кнопкой больше 1 раза?
Уже переискал множество способов, но так и не смог понять
@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')
msg = await interaction.response.edit_message(embed=emb)
await asyncio.sleep(9)
await msg.edit(embed=emb2)
self.value = False
self.stop()
Выдает
await msg.edit(embed=emb2)
AttributeError: 'NoneType' object has no attribute 'edit'