made update sleep before checking if server is offline

This commit is contained in:
Seaswimmer 2023-07-15 18:28:32 -04:00
parent 1cc6afacb2
commit 5b82db41b6
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -90,6 +90,7 @@ class Pterodactyl(commands.Cog):
]
requests.post(await self.get_url(interaction.guild, "power"), headers=headers, json={"signal": "start"})
await interaction_message.edit(content="Packwiz installer started...")
await asyncio.sleep(1)
while True:
async with aiohttp.ClientSession() as session:
async with session.get(await self.get_url(interaction.guild, "resources"), headers=headers) as response:
@ -130,6 +131,7 @@ class Pterodactyl(commands.Cog):
await Pterodactyl.put(await Pterodactyl.get_url(interaction.guild, "startup/variable"), self.passed_info[2], data)
requests.post(await Pterodactyl.get_url(interaction.guild, "power"), headers=self.passed_info[2], json={"signal": "start"})
await self.passed_info[5].edit("Packwiz installer started...")
await asyncio.sleep(1)
while True:
async with aiohttp.ClientSession() as session:
async with session.get(await Pterodactyl.get_url(interaction.guild, "resources"), headers=self.passed_info[2]) as response: