From 9f8fd0c376ce38e1274e0adc73b868460e4c5032 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 15 Jul 2023 13:22:10 -0400 Subject: [PATCH] modified formatting of config messages --- pterodactyl/ptero.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pterodactyl/ptero.py b/pterodactyl/ptero.py index 43d3797..cfbc319 100644 --- a/pterodactyl/ptero.py +++ b/pterodactyl/ptero.py @@ -198,17 +198,17 @@ class Pterodactyl(commands.Cog): message = "" if self.base_url.value != "": await self.config.guild(interaction.guild).base_url.set(self.base_url.value) - message += f"- Base URL set to `{self.base_url.value}`\n" + message += f"- Base URL set to\n - `{self.base_url.value}`\n" if self.api_key.value != "": await self.config.guild(interaction.guild).api_key.set(self.api_key.value) - trimmed_api_key = self.api_key.value[:16] + "`..." - message += f"- API Key set to `{trimmed_api_key}\n" + trimmed_api_key = self.api_key.value[:16] + message += f"- API Key set to\n - `{trimmed_api_key}` - Trimmed for security\n" if self.server_id.value != "": await self.config.guild(interaction.guild).server_id.set(self.server_id.value) - message += f"- Server ID set to `{self.server_id.value}`\n" + message += f"- Server ID set to\n - `{self.server_id.value}`\n" if message == "": trimmed_api_key = str(await self.config.guild(interaction.guild).api_key())[:16] + "`..." - send = f"No changes were made.\nCurrent configuration:\n- Base URL: `{await self.config.guild(interaction.guild).base_url()}`\n- API Key: `{trimmed_api_key}\n- Server ID: `{await self.config.guild(interaction.guild).server_id()}`" + send = f"No changes were made.\nCurrent configuration:\n- Base URL:\n - `{await self.config.guild(interaction.guild).base_url()}`\n- API Key:\n - `{trimmed_api_key}` - Trimmed for security\n- Server ID:\n - `{await self.config.guild(interaction.guild).server_id()}`" else: send = f"Configuration changed:\n{message}" await interaction.response.send_message(send, ephemeral=True) @@ -236,7 +236,7 @@ class Pterodactyl(commands.Cog): message = "" if self.startup_jar.value != "": await self.config.guild(interaction.guild).startup_jar.set(self.startup_jar.value) - message += f"- Startup jar set to `{self.startup_jar.value}`\n" + message += f"- Startup jar set to\n - `{self.startup_jar.value}`\n" if self.startup_arguments.value != "": await self.config.guild(interaction.guild).startup_arguments.set(self.startup_arguments.value) message += f"- Startup arguments set to:\n```{self.startup_arguments.value}```\n"