From 73f6520fac153326616a2ca1f8428f2054a20b5d Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 15 Jul 2023 23:01:28 -0400 Subject: [PATCH] fix: changed how interactions edit messages --- pterodactyl/ptero.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pterodactyl/ptero.py b/pterodactyl/ptero.py index f72646a..9c022ee 100644 --- a/pterodactyl/ptero.py +++ b/pterodactyl/ptero.py @@ -121,7 +121,7 @@ class Pterodactyl(commands.Cog): @ui.button(label="Yes", style=discord.ButtonStyle.success) async def yes_button(self, button:ui.Button, interaction:discord.Interaction): requests.post(await Pterodactyl.get_url(interaction.guild, "power"), headers=self.passed_info['headers'], json={"signal": "stop"}) - await interaction.response.edit_message("Server stopping...", view=None) + await interaction.edit_original_response("Server stopping...", view=None) while True: async with aiohttp.ClientSession() as session: async with session.get(await Pterodactyl.get_url(interaction.guild, "resources"), headers=self.passed_info['headers']) as response: @@ -167,7 +167,7 @@ class Pterodactyl(commands.Cog): async def no_button(self, button:ui.Button, interaction:discord.Interaction): for button in self.children: button.disabled = True - await interaction.response.edit_message(content=f"Command cancelled.", view=self) + await interaction.edit_original_response(content=f"Command cancelled.", view=self) @app_commands.command() async def test(self, interaction: discord.Interaction, endpoint: str = None):