From 9be254e9837e210917f3fce9d45bade59e1629aa Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 15 Jul 2023 23:33:33 -0400 Subject: [PATCH] misc: minor changes to get_url --- pterodactyl/ptero.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pterodactyl/ptero.py b/pterodactyl/ptero.py index d16ff0b..04d49b3 100644 --- a/pterodactyl/ptero.py +++ b/pterodactyl/ptero.py @@ -20,16 +20,16 @@ class Pterodactyl(commands.Cog): ) async def get_url(self, guild, endpoint = None): - """Returns the base url for the Servers API, or the url for a specific API endpoint if one is provided.""" + """Returns the base url for the server's API, or the url for a specific API endpoint if one is provided.""" if await self.config.guild(guild).server_id() is None: raise LookupError("Server ID not set.") elif await self.config.guild(guild).base_url() is None: raise LookupError("Base URL not set.") base_url = await self.config.guild(guild).base_url() server_id = await self.config.guild(guild).server_id() - url = f"https://{base_url}/api/client/servers/{server_id}/" + url = f"https://{base_url}/api/client/servers/{server_id}" if endpoint: - url += endpoint + url += '/' + endpoint return url async def put(self, url: str, headers: dict, data: dict):