fix(pterodactyl): fixed broken slash commands
Some checks failed
Actions / Lint Code (Ruff & Pylint) (push) Failing after 21s
Actions / Build Documentation (MkDocs) (push) Successful in 24s

This commit is contained in:
Seaswimmer 2024-03-07 00:13:43 -05:00
parent 64ab2fbf82
commit f707b70097
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -105,11 +105,11 @@ class Pterodactyl(commands.Cog):
self.retry_counter = 0 self.retry_counter = 0
self.task = self.get_task() self.task = self.get_task()
@commands.group(autohelp = True, name = "pterodactyl", aliases = ["ptero"]) @commands.hybrid_group(autohelp = True, name = "pterodactyl", aliases = ["ptero"])
async def pterodactyl(self, ctx: commands.Context) -> None: async def pterodactyl(self, ctx: commands.Context) -> None:
"""Pterodactyl allows you to manage your Pterodactyl Panel from Discord.""" """Pterodactyl allows you to manage your Pterodactyl Panel from Discord."""
@pterodactyl.hybrid_command(name = "command", aliases = ["cmd", "execute", "exec"]) @pterodactyl.command(name = "command", aliases = ["cmd", "execute", "exec"])
@commands.admin() @commands.admin()
async def pterodactyl_command(self, ctx: commands.Context, *, command: str) -> None: async def pterodactyl_command(self, ctx: commands.Context, *, command: str) -> None:
"""Send a command to the server console.""" """Send a command to the server console."""
@ -126,7 +126,7 @@ class Pterodactyl(commands.Cog):
self.retry_counter = 0 self.retry_counter = 0
self.task = self.get_task() self.task = self.get_task()
@pterodactyl.hybrid_group(autohelp = True, name = "power") @pterodactyl.group(autohelp = True, name = "power")
@commands.admin() @commands.admin()
async def pterodactyl_power(self, ctx: commands.Context) -> None: async def pterodactyl_power(self, ctx: commands.Context) -> None:
"""Send power actions to the server.""" """Send power actions to the server."""
@ -199,7 +199,7 @@ class Pterodactyl(commands.Cog):
else: else:
await message.edit(content="Cancelled.", view=None) await message.edit(content="Cancelled.", view=None)
@pterodactyl.group(autohelp = True, name = "config", aliases = ["settings", "set"]) @pterodactyl.group(autohelp = True, name = "config", aliases = ["settings", "set"], with_app_command = False)
@commands.is_owner() @commands.is_owner()
async def pterodactyl_config(self, ctx: commands.Context) -> None: async def pterodactyl_config(self, ctx: commands.Context) -> None:
"""Configure Pterodactyl settings.""" """Configure Pterodactyl settings."""