Refactor Pterodactyl cog to use aiohttp #2
1 changed files with 3 additions and 3 deletions
|
@ -128,7 +128,7 @@ class Pterodactyl(commands.Cog):
|
||||||
power = app_commands.Group(name='power', description="Controls the server's power state.")
|
power = app_commands.Group(name='power', description="Controls the server's power state.")
|
||||||
|
|
||||||
@power.command(name='start', description="Starts the server.")
|
@power.command(name='start', description="Starts the server.")
|
||||||
@power.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.response.defer(ephemeral=True, thinking=True)
|
await interaction.response.defer(ephemeral=True, thinking=True)
|
||||||
|
@ -153,7 +153,7 @@ class Pterodactyl(commands.Cog):
|
||||||
await message.delete(delay=3)
|
await message.delete(delay=3)
|
||||||
|
|
||||||
@power.command(name='restart', description="Restarts the server.")
|
@power.command(name='restart', description="Restarts the server.")
|
||||||
@power.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.response.defer(ephemeral=True, thinking=True)
|
await interaction.response.defer(ephemeral=True, thinking=True)
|
||||||
|
@ -181,7 +181,7 @@ class Pterodactyl(commands.Cog):
|
||||||
await message.delete(delay=3)
|
await message.delete(delay=3)
|
||||||
|
|
||||||
@power.command(name='stop', description="Stops the server.")
|
@power.command(name='stop', description="Stops the server.")
|
||||||
@power.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.response.defer(ephemeral=True, thinking=True)
|
await interaction.response.defer(ephemeral=True, thinking=True)
|
||||||
|
|
Reference in a new issue