From df92bc34cc35b4fa67b21bc581a9fae0a9627746 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Tue, 5 Mar 2024 02:18:11 -0500 Subject: [PATCH] fix(pterodactyl): fixed some bugs --- pterodactyl/pterodactyl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pterodactyl/pterodactyl.py b/pterodactyl/pterodactyl.py index fab4389..42b7ccc 100644 --- a/pterodactyl/pterodactyl.py +++ b/pterodactyl/pterodactyl.py @@ -126,11 +126,11 @@ class Pterodactyl(commands.Cog): message = await ctx.send("Are you sure you want to start the server?", view=view) await view.wait() if view.result is True: - await ctx.message("Sending websocket command to start server...") + await message.edit(content="Sending websocket command to start server...", view=None) await self.websocket.send(json.dumps({"event": "set state", "args": ["start"]})) await message.edit(content="Server starting...") else: - await message.edit(content="Cancelled.") + await message.edit(content="Cancelled.", view=None) @pterodactyl_power.command(name = "stop") async def pterodactyl_power_stop(self, ctx: commands.Context) -> None: @@ -144,11 +144,11 @@ class Pterodactyl(commands.Cog): message = await ctx.send("Are you sure you want to stop the server?", view=view) await view.wait() if view.result is True: - await message.edit("Sending websocket command to stop server...") + await message.edit(content="Sending websocket command to stop server...", view=None) await self.websocket.send(json.dumps({"event": "set state", "args": ["stop"]})) await message.edit(content="Server stopping...") else: - await message.edit(content="Cancelled.") + await message.edit(content="Cancelled.", view=None) @pterodactyl_power.command(name = "restart") async def pterodactyl_power_restart(self, ctx: commands.Context) -> None: @@ -160,11 +160,11 @@ class Pterodactyl(commands.Cog): message = await ctx.send("Are you sure you want to restart the server?", view=view) await view.wait() if view.result is True: - await message.edit("Sending websocket command to restart server...") + await message.edit(content="Sending websocket command to restart server...", view=None) await self.websocket.send(json.dumps({"event": "set state", "args": ["restart"]})) await message.edit(content="Server restarting...") else: - await message.edit(content="Cancelled.") + await message.edit(content="Cancelled.", view=None) @pterodactyl.group(autohelp = True, name = "config", aliases = ["settings", "set"]) @commands.is_owner()