feat(pterodactyl): added more debug logging to the configuration commands
All checks were successful
Actions / Lint Code (Ruff) (pull_request) Successful in 7s
Actions / Build Documentation (MkDocs) (pull_request) Successful in 23s

This commit is contained in:
Seaswimmer 2024-02-28 08:56:47 -05:00
parent d92831f3db
commit d092f78502
Signed by: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -94,6 +94,7 @@ class Pterodactyl(commands.Cog):
"""Set the base URL of your Pterodactyl Panel. Please include the protocol (http/https).""" """Set the base URL of your Pterodactyl Panel. Please include the protocol (http/https)."""
await self.config.base_url.set(base_url) await self.config.base_url.set(base_url)
await ctx.send(f"Base URL set to {base_url}") await ctx.send(f"Base URL set to {base_url}")
self.logger.debug("Configuration value set: base_url = %s\nRestarting task...", base_url)
await self.task.cancel() await self.task.cancel()
self.task = self.get_task() self.task = self.get_task()
@ -102,6 +103,7 @@ class Pterodactyl(commands.Cog):
"""Set the API key for your Pterodactyl Panel.""" """Set the API key for your Pterodactyl Panel."""
await self.config.api_key.set(api_key) await self.config.api_key.set(api_key)
await ctx.send(f"API key set to `{api_key[:5]}...{api_key[-4:]}`") await ctx.send(f"API key set to `{api_key[:5]}...{api_key[-4:]}`")
self.logger.debug("Configuration value set: api_key = %s\nRestarting task...", api_key)
await self.task.cancel() await self.task.cancel()
self.task = self.get_task() self.task = self.get_task()
@ -110,5 +112,6 @@ class Pterodactyl(commands.Cog):
"""Set the server ID for your Pterodactyl Panel.""" """Set the server ID for your Pterodactyl Panel."""
await self.config.server_id.set(server_id) await self.config.server_id.set(server_id)
await ctx.send(f"Server ID set to {server_id}") await ctx.send(f"Server ID set to {server_id}")
self.logger.debug("Configuration value set: server_id = %s\nRestarting task...", server_id)
await self.task.cancel() await self.task.cancel()
self.task = self.get_task() self.task = self.get_task()