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 72e7d83bd7 - Show all commits

View file

@ -53,12 +53,6 @@ class Pterodactyl(commands.Cog):
url += '/' + endpoint
return url
async def put(self, url: str, headers: dict, data: dict):
"""Sends an asyncio PUT request to the specified URL with the specified headers and data."""
async with aiohttp.ClientSession() as session:
async with session.put(url, headers=headers, json=data) as response:
return response
@app_commands.command(name="update", description="Updates the server.")
@app_commands.guild_only()
async def update(self, interaction: discord.Interaction):