diff --git a/pterodactyl/ptero.py b/pterodactyl/ptero.py index 25364c4..1eaa6bc 100644 --- a/pterodactyl/ptero.py +++ b/pterodactyl/ptero.py @@ -56,7 +56,7 @@ class Pterodactyl(commands.Cog): @app_commands.guild_only() async def start(self, interaction: discord.Interaction): """Starts the server.""" - await interaction.defer(ephemeral=True, thinking=True) + await interaction.response.defer(ephemeral=True, thinking=True) interaction_message = await interaction.original_response() headers = await self.get_headers(interaction.guild) response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers) @@ -81,7 +81,7 @@ class Pterodactyl(commands.Cog): @app_commands.guild_only() async def restart(self, interaction: discord.Interaction): """Restarts the server.""" - await interaction.defer(ephemeral=True, thinking=True) + await interaction.response.defer(ephemeral=True, thinking=True) interaction_message = await interaction.original_response() headers = await self.get_headers(interaction.guild) response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers) @@ -109,7 +109,7 @@ class Pterodactyl(commands.Cog): @app_commands.guild_only() async def stop(self, interaction: discord.Interaction): """Stops the server.""" - await interaction.defer(ephemeral=True, thinking=True) + await interaction.response.defer(ephemeral=True, thinking=True) interaction_message = await interaction.original_response() headers = await self.get_headers(interaction.guild) response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers)