Compare commits
No commits in common. "0cd9c5cc247124ef6a45a35f65a5b50a86ed1f5b" and "25e776c02c71f376390173148debed20cb4ec027" have entirely different histories.
0cd9c5cc24
...
25e776c02c
1 changed files with 3 additions and 1 deletions
|
@ -50,6 +50,7 @@ class Pterodactyl(commands.Cog):
|
||||||
async with session.put(url, headers=headers, json=data) as response:
|
async with session.put(url, headers=headers, json=data) as response:
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app_commands.command(name="update", description="Updates the server.")
|
@app_commands.command(name="update", description="Updates the server.")
|
||||||
@app_commands.guild_only()
|
@app_commands.guild_only()
|
||||||
async def update(self, interaction: discord.Interaction):
|
async def update(self, interaction: discord.Interaction):
|
||||||
|
@ -66,6 +67,7 @@ class Pterodactyl(commands.Cog):
|
||||||
await interaction_message.edit(f"Something went wrong.\nError: `Startup arguments not set.`", ephemeral=True)
|
await interaction_message.edit(f"Something went wrong.\nError: `Startup arguments not set.`", ephemeral=True)
|
||||||
raise LookupError("Startup arguments not set.")
|
raise LookupError("Startup arguments not set.")
|
||||||
else:
|
else:
|
||||||
|
api_key = await self.config.guild(interaction.guild).api_key()
|
||||||
startup_jar = await self.config.guild(interaction.guild).startup_jar()
|
startup_jar = await self.config.guild(interaction.guild).startup_jar()
|
||||||
startup_commands = await self.config.guild(interaction.guild).startup_arguments()
|
startup_commands = await self.config.guild(interaction.guild).startup_arguments()
|
||||||
headers = await self.get_headers(interaction.guild)
|
headers = await self.get_headers(interaction.guild)
|
||||||
|
@ -111,7 +113,7 @@ class Pterodactyl(commands.Cog):
|
||||||
continue
|
continue
|
||||||
for data in old_startup_vars:
|
for data in old_startup_vars:
|
||||||
await self.put(await self.get_url(interaction.guild, "startup/variable"), headers, data)
|
await self.put(await self.get_url(interaction.guild, "startup/variable"), headers, data)
|
||||||
await interaction_message.edit(content="Updater 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 = {
|
passed_info = {
|
||||||
"headers": headers,
|
"headers": headers,
|
||||||
|
|
Reference in a new issue