Skip to content

Commit

Permalink
Added cancel button in update member list command
Browse files Browse the repository at this point in the history
  • Loading branch information
Endyya committed Dec 22, 2024
1 parent 7886f57 commit 71773c3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/SilicaAnimus/discord_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,18 +573,24 @@ async def button_confirm(self, interaction, button):
await interaction.channel.send(
f'On ajoute {user} à la liste des membres')

for user in to_keep:
await interaction.channel.send(
f'On garde {user} comme membre')

@discord.ui.button(label = 'Annuler',
style = discord.ButtonStyle.danger,
disabled = False,
custom_id = 'cancel')
async def button_cancel(self, interaction, button):
print(interaction)


for item in self.children:
item.disabled = True

embed.description = 'COMMANDE ANNULÉE'
embed.clear_fields()

await interaction.response.edit_message(embed = embed,
view = buttons)




buttons = Buttons()

await interaction.response.send_message(embed = embed,
Expand Down

0 comments on commit 71773c3

Please # to comment.