fix(pterodactyl): fixed InteractionResponded error when using a power slash command

This commit is contained in:
Seaswimmer 2024-03-07 01:03:36 -05:00
parent dd62b7d7ce
commit 41a8d575d4
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -128,14 +128,14 @@ class Pterodactyl(commands.Cog):
if view.result is True:
if isinstance(ctx, discord.Interaction):
await ctx.response.edit_message(content=f"Sending websocket command to {action} server...", view=None)
await ctx.edit_original_response(content=f"Sending websocket command to {action} server...", view=None)
else:
await message.edit(content=f"Sending websocket command to {action} server...", view=None)
await self.websocket.send(json.dumps({"event": "set state", "args": [action]}))
if isinstance(ctx, discord.Interaction):
await ctx.response.edit_message(content=f"Server {action_ing}", view=None)
await ctx.edit_original_response(content=f"Server {action_ing}", view=None)
else:
await message.edit(content=f"Server {action_ing}", view=None)