fix: testing a fix for update

This commit is contained in:
Seaswimmer 2023-07-23 14:29:07 -04:00
parent fa48b3a924
commit 1bf60cef81
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -105,7 +105,7 @@ class Pterodactyl(commands.Cog):
] ]
if response_dict['attributes']['current_state'] == "offline": if response_dict['attributes']['current_state'] == "offline":
for data in updater_startup_vars: for data in updater_startup_vars:
await session.put(await self.get_url(interaction.guild, "startup/variable"), headers=headers, data=data) await session.put(await self.get_url(interaction.guild, "startup/variable"), headers=headers, json=data)
await session.post(await self.get_url(interaction.guild, "power"), headers=headers, json={"signal": "start"}) await session.post(await self.get_url(interaction.guild, "power"), headers=headers, json={"signal": "start"})
await interaction_message.edit(content="Updater started...") await interaction_message.edit(content="Updater started...")
await asyncio.sleep(1) await asyncio.sleep(1)
@ -119,7 +119,7 @@ class Pterodactyl(commands.Cog):
await asyncio.sleep(1) await asyncio.sleep(1)
continue continue
for data in old_startup_vars: for data in old_startup_vars:
await session.put(await self.get_url(interaction.guild, "startup/variable"), headers=headers, data=data) await session.put(await self.get_url(interaction.guild, "startup/variable"), headers=headers, json=data)
await interaction_message.edit(content="Updater finished.\nUpdate process completed!") await interaction_message.edit(content="Updater 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 = {