From 3ed6cffe5d98180f8e8e2778483bd70a90760aa3 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Mon, 24 Jul 2023 09:06:56 -0400 Subject: [PATCH] fix: awaited some things inside power commands --- pterodactyl/ptero.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pterodactyl/ptero.py b/pterodactyl/ptero.py index 428e497..bb3e74c 100644 --- a/pterodactyl/ptero.py +++ b/pterodactyl/ptero.py @@ -144,7 +144,7 @@ class Pterodactyl(commands.Cog): interaction_message = await interaction.original_response() headers = await self.get_headers(interaction.guild) async with self.session.get(await self.get_url(interaction.guild, "resources"), headers=headers) as response: - response_json = response.json() + response_json = await response.json() current_status = response_json['attributes']['current_state'] if current_status == "offline": passed_info = { @@ -172,7 +172,7 @@ class Pterodactyl(commands.Cog): interaction_message = await interaction.original_response() headers = await self.get_headers(interaction.guild) async with self.session.get(await self.get_url(interaction.guild, "resources"), headers=headers) as response: - response_json = response.json() + response_json = await response.json() current_status = response_json['attributes']['current_state'] if current_status == "running": passed_info = { @@ -203,7 +203,7 @@ class Pterodactyl(commands.Cog): interaction_message = await interaction.original_response() headers = await self.get_headers(interaction.guild) async with requests.get(await self.get_url(interaction.guild, "resources"), headers=headers) as response: - response_json = response.json() + response_json = await response.json() current_status = response_json['attributes']['current_state'] if current_status == "running" or current_status == "starting": passed_info = {