Refactor Pterodactyl cog to use aiohttp #2

Merged
cswimr merged 26 commits from aiohttp-refactor into main 2023-07-24 09:29:55 -04:00
Showing only changes of commit fb99f5ea33 - Show all commits

View file

@ -116,7 +116,7 @@ class Pterodactyl(commands.Cog):
await interaction_message.edit(content="Updater finished.")
break
else:
await asyncio.sleep(1)
await asyncio.sleep(0.5)
continue
for data in old_startup_vars:
await session.put(await self.get_url(interaction.guild, "startup/variable"), headers=headers, json=data)
@ -230,7 +230,7 @@ class Pterodactyl(commands.Cog):
await self.passed_info['interaction'].edit_original_response(content="\nServer stopped!")
break
else:
await asyncio.sleep(1)
await asyncio.sleep(0.5)
continue
for data in self.passed_info['updater_startup_vars']:
await session.put(self, url=await Pterodactyl.get_url(self, self.passed_info['guild'], "startup/variable"), headers=self.passed_info['headers'], json=data)
@ -258,7 +258,7 @@ class Pterodactyl(commands.Cog):
await self.passed_info['interaction'].edit_original_response(content="Server started!\nUpdate process completed!")
break
else:
await asyncio.sleep(1)
await asyncio.sleep(0.5)
continue
@ui.button(label="No", style=discord.ButtonStyle.danger)