From 40d3bb6115fca724805ac9c71840d33c3c010fee Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 15 Jul 2023 18:19:20 -0400 Subject: [PATCH] fixed old_startup_args --- pterodactyl/ptero.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pterodactyl/ptero.py b/pterodactyl/ptero.py index 170bbc8..76bba2a 100644 --- a/pterodactyl/ptero.py +++ b/pterodactyl/ptero.py @@ -64,7 +64,7 @@ class Pterodactyl(commands.Cog): response_dict = response.json() list_var = requests.get(await self.get_url(interaction.guild, "startup"), headers=headers) list_var_response_dict = list_var.json() - old_startup_args = [list_var_response_dict['data'][0]['attributes']['server_value'], list_var_response_dict['meta']['startup_command']] + old_startup_args = [list_var_response_dict['data'][0]['attributes']['server_value'], list_var_response_dict['data'][4]['attributes']['server_value']] put_data = [ { "key": "FLAGS", @@ -251,3 +251,14 @@ class Pterodactyl(commands.Cog): else: send = f"Configuration changed:\n{message}" await interaction.response.send_message(send, ephemeral=True) + + +import requests +headers = { + "Authorization": "Bearer ptlc_9BVTvT41F7mNtG7YIqaxhOySf4Z8YDmVYwaITwwIbA7", + "Content-Type": "application/json", + "Accept": "Application/vnd.pterodactyl.v1+json" +} +request = requests.get("https://mc.bloom.host/api/client/servers/d6d05b41-4da5-4c5b-9ee6-6e25f61a596b/startup", headers=headers) +request_dict = request.json() +print(request_dict)