made update sleep before checking if server is offline
This commit is contained in:
parent
1cc6afacb2
commit
5b82db41b6
1 changed files with 2 additions and 0 deletions
|
@ -90,6 +90,7 @@ class Pterodactyl(commands.Cog):
|
||||||
]
|
]
|
||||||
requests.post(await self.get_url(interaction.guild, "power"), headers=headers, json={"signal": "start"})
|
requests.post(await self.get_url(interaction.guild, "power"), headers=headers, json={"signal": "start"})
|
||||||
await interaction_message.edit(content="Packwiz installer started...")
|
await interaction_message.edit(content="Packwiz installer started...")
|
||||||
|
await asyncio.sleep(1)
|
||||||
while True:
|
while True:
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.get(await self.get_url(interaction.guild, "resources"), headers=headers) as response:
|
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)
|
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"})
|
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 self.passed_info[5].edit("Packwiz installer started...")
|
||||||
|
await asyncio.sleep(1)
|
||||||
while True:
|
while True:
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.get(await Pterodactyl.get_url(interaction.guild, "resources"), headers=self.passed_info[2]) as response:
|
async with session.get(await Pterodactyl.get_url(interaction.guild, "resources"), headers=self.passed_info[2]) as response:
|
||||||
|
|
Reference in a new issue