Compare commits
2 commits
0b262eed2b
...
98dccd919e
Author | SHA1 | Date | |
---|---|---|---|
98dccd919e | |||
fa2b5a034d |
1 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ class Pterodactyl(commands.Cog):
|
||||||
await interaction_message.edit(content="Packwiz installer finished.\nUpdate process completed!")
|
await interaction_message.edit(content="Packwiz installer finished.\nUpdate process completed!")
|
||||||
elif response_dict['attributes']['current_state'] == "running" or response_dict['attributes']['current_state'] == "starting":
|
elif response_dict['attributes']['current_state'] == "running" or response_dict['attributes']['current_state'] == "starting":
|
||||||
passed_info = [old_startup_args[0], old_startup_args[1], headers, put_data, new_put_data, interaction_message]
|
passed_info = [old_startup_args[0], old_startup_args[1], headers, put_data, new_put_data, interaction_message]
|
||||||
await interaction_message.edit(content="Server is already running! Are you sure you'd like to stop the server for updates?", view=self.UpdateButtons(timeout=180, passed_info=passed_info))
|
await interaction_message.edit(content="The server is already running! Are you sure you'd like to stop the server for updates?", view=self.UpdateButtons(timeout=180, passed_info=passed_info))
|
||||||
|
|
||||||
class UpdateButtons(discord.ui.View):
|
class UpdateButtons(discord.ui.View):
|
||||||
def __init__(self, timeout, passed_info):
|
def __init__(self, timeout, passed_info):
|
||||||
|
@ -115,7 +115,7 @@ class Pterodactyl(commands.Cog):
|
||||||
|
|
||||||
@discord.ui.button(label="Yes", style=discord.ButtonStyle.success)
|
@discord.ui.button(label="Yes", style=discord.ButtonStyle.success)
|
||||||
async def yes_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
async def yes_button(self, button:discord.ui.Button, interaction:discord.Interaction):
|
||||||
requests.post(await self.get_url(interaction.guild, "power"), headers=headers, json={"signal": "stop"})
|
requests.post(await Pterodactyl.get_url(interaction.guild, "power"), headers=headers, json={"signal": "stop"})
|
||||||
await interaction.response.edit_message("Server stopping...", view=None)
|
await interaction.response.edit_message("Server stopping...", view=None)
|
||||||
while True:
|
while True:
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
|
|
Reference in a new issue