potentially patched test command

This commit is contained in:
Seaswimmer 2023-07-14 12:29:59 -04:00
parent 7aa4b29118
commit 789e58f29a
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -15,9 +15,9 @@ 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 endpoint if one is provided."""
if not await self.config.guild(guild).server_id():
if await self.config.guild(guild).server_id() is None:
raise LookupError("Server ID not set.")
elif not await self.config.guild(guild).base_url():
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()