fix: fixed power group

This commit is contained in:
Seaswimmer 2023-07-16 13:34:23 -04:00
parent 565a9f7ccc
commit 88471438a5
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -56,7 +56,7 @@ class Pterodactyl(commands.Cog):
@app_commands.guild_only() @app_commands.guild_only()
async def start(self, interaction: discord.Interaction): async def start(self, interaction: discord.Interaction):
"""Starts the server.""" """Starts the server."""
await interaction.defer(ephemeral=True, thinking=True) await interaction.response.defer(ephemeral=True, thinking=True)
interaction_message = await interaction.original_response() interaction_message = await interaction.original_response()
headers = await self.get_headers(interaction.guild) headers = await self.get_headers(interaction.guild)
response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers) response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers)
@ -81,7 +81,7 @@ class Pterodactyl(commands.Cog):
@app_commands.guild_only() @app_commands.guild_only()
async def restart(self, interaction: discord.Interaction): async def restart(self, interaction: discord.Interaction):
"""Restarts the server.""" """Restarts the server."""
await interaction.defer(ephemeral=True, thinking=True) await interaction.response.defer(ephemeral=True, thinking=True)
interaction_message = await interaction.original_response() interaction_message = await interaction.original_response()
headers = await self.get_headers(interaction.guild) headers = await self.get_headers(interaction.guild)
response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers) response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers)
@ -109,7 +109,7 @@ class Pterodactyl(commands.Cog):
@app_commands.guild_only() @app_commands.guild_only()
async def stop(self, interaction: discord.Interaction): async def stop(self, interaction: discord.Interaction):
"""Stops the server.""" """Stops the server."""
await interaction.defer(ephemeral=True, thinking=True) await interaction.response.defer(ephemeral=True, thinking=True)
interaction_message = await interaction.original_response() interaction_message = await interaction.original_response()
headers = await self.get_headers(interaction.guild) headers = await self.get_headers(interaction.guild)
response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers) response = requests.get(await self.get_url(interaction.guild, "resources"), headers=headers)