misc: changed some strings

This commit is contained in:
Seaswimmer 2023-07-16 08:36:00 -04:00
parent 508551c579
commit 99a6a0dfda
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -90,14 +90,14 @@ class Pterodactyl(commands.Cog):
for data in updater_startup_vars: for data in updater_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)
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="Updater started...")
await asyncio.sleep(1) 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:
response_dict = await response.json() response_dict = await response.json()
if response_dict['attributes']['current_state'] == "offline": if response_dict['attributes']['current_state'] == "offline":
await interaction_message.edit(content="Packwiz installer finished.") await interaction_message.edit(content="Updater finished.")
break break
else: else:
await asyncio.sleep(1) await asyncio.sleep(1)
@ -138,14 +138,14 @@ class Pterodactyl(commands.Cog):
for data in self.passed_info['updater_startup_vars']: for data in self.passed_info['updater_startup_vars']:
await Pterodactyl.put(self, url=await Pterodactyl.get_url(self, self.passed_info['guild'], "startup/variable"), headers=self.passed_info['headers'], data=data) await Pterodactyl.put(self, url=await Pterodactyl.get_url(self, self.passed_info['guild'], "startup/variable"), headers=self.passed_info['headers'], data=data)
requests.post(url=await Pterodactyl.get_url(self, self.passed_info['guild'], "power"), headers=self.passed_info['headers'], json={"signal": "start"}) requests.post(url=await Pterodactyl.get_url(self, self.passed_info['guild'], "power"), headers=self.passed_info['headers'], json={"signal": "start"})
await self.passed_info['interaction'].edit_original_response(content="Packwiz installer started...") await self.passed_info['interaction'].edit_original_response(content="Updater started...")
await asyncio.sleep(2) await asyncio.sleep(2)
while True: while True:
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
async with session.get(await Pterodactyl.get_url(self, self.passed_info['guild'], "resources"), headers=self.passed_info['headers']) as response: async with session.get(await Pterodactyl.get_url(self, self.passed_info['guild'], "resources"), headers=self.passed_info['headers']) as response:
response_dict = await response.json() response_dict = await response.json()
if response_dict['attributes']['current_state'] == "offline": if response_dict['attributes']['current_state'] == "offline":
await self.passed_info['interaction'].edit_original_response(content="Packwiz installer finished!") await self.passed_info['interaction'].edit_original_response(content="Updater finished!")
break break
else: else:
await asyncio.sleep(1) await asyncio.sleep(1)