fix(pterodactyl): allow killing the server while it's starting or stopping

This commit is contained in:
Seaswimmer 2024-03-11 14:20:30 -04:00
parent 40b846123f
commit 25b26322d2
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -111,7 +111,7 @@ class Pterodactyl(commands.Cog):
return await ctx.response.send_message(f"Server is already {action_ing}.", ephemeral=True)
return await ctx.send(f"Server is already {action_ing}.")
if current_status in ["starting", "stopping"]:
if current_status in ["starting", "stopping"] and action != "kill":
if isinstance(ctx, discord.Interaction):
return await ctx.response.send_message("Another power action is already in progress.", ephemeral=True)
return await ctx.send("Another power action is already in progress.")