fix(pterodactyl): pylint fixes
This commit is contained in:
parent
f485df856c
commit
8a22d5ce23
1 changed files with 4 additions and 6 deletions
|
@ -41,10 +41,10 @@ class Pterodactyl(commands.Cog):
|
|||
websocket_credentials = client.servers.get_websocket(server_id)
|
||||
self.logger.debug("Websocket connection details retrieved:\nSocket: %s\nToken: %s", websocket_credentials['data']['socket'], websocket_credentials['data']['token'])
|
||||
except exceptions.ClientConfigError as e:
|
||||
self.logger.error(f'Failed to initialize Pterodactyl client: {e}')
|
||||
self.logger.error('Failed to initialize Pterodactyl client: %s', e)
|
||||
return
|
||||
except exceptions.PterodactylApiError as e:
|
||||
self.logger.error(f'Failed to retrieve Pterodactyl websocket: {e}')
|
||||
self.logger.error('Failed to retrieve Pterodactyl websocket: %s', e)
|
||||
return
|
||||
|
||||
async with websockets.connect(websocket_credentials['data']['socket'], extra_headers=extra_headers) as websocket:
|
||||
|
@ -77,17 +77,15 @@ class Pterodactyl(commands.Cog):
|
|||
|
||||
async def cog_unload(self):
|
||||
self.task.cancel()
|
||||
await self.client._session.close()
|
||||
await self.client._session.close() # pylint: disable=protected-access
|
||||
|
||||
@commands.group(autohelp = True, name = "pterodactyl", aliases = ["ptero"])
|
||||
async def pterodactyl(self, ctx: commands.Context):
|
||||
"""Pterodactyl allows you to manage your Pterodactyl Panel from Discord."""
|
||||
pass
|
||||
|
||||
@pterodactyl.group(autohelp = True, name = "config", aliases = ["settings", "set"])
|
||||
async def pterodactyl_config(self, ctx: commands.Context):
|
||||
"""Configure Pterodactyl settings."""
|
||||
pass
|
||||
|
||||
@pterodactyl_config.command(name = "url")
|
||||
async def pterodactyl_config_base_url(self, ctx: commands.Context, base_url: str):
|
||||
|
|
Loading…
Reference in a new issue