diff --git a/pterodactyl/ptero.py b/pterodactyl/ptero.py index 3adcf3f..136721a 100644 --- a/pterodactyl/ptero.py +++ b/pterodactyl/ptero.py @@ -113,7 +113,7 @@ class Pterodactyl(commands.Cog): super().__init__() self.passed_info = passed_info - @discord.ui.button(label="Yes", style=discord.ButtonStyle.green, emoji="✅") + @discord.ui.button(label="Yes", style=discord.ButtonStyle.success) async def yes_button(self, button:discord.ui.Button, interaction:discord.Interaction): await self.passed_info[5].edit("Server stopping...") while True: @@ -158,9 +158,11 @@ class Pterodactyl(commands.Cog): await asyncio.sleep(1) continue - @discord.ui.button(label="No", style=discord.ButtonStyle.red, emoji="❌") + @discord.ui.button(label="No", style=discord.ButtonStyle.danger) async def no_button(self, button:discord.ui.Button, interaction:discord.Interaction): - await self.passed_info[5].edit(content=f"Command cancelled.") + for button in self.children: + button.disabled = True + await self.passed_info[5].edit(content=f"Command cancelled.", view=self) @app_commands.command() async def test(self, interaction: discord.Interaction, endpoint: str = None):