diff --git a/pterodactyl/ptero.py b/pterodactyl/ptero.py index cbf4d71..9591a10 100644 --- a/pterodactyl/ptero.py +++ b/pterodactyl/ptero.py @@ -206,8 +206,10 @@ class Pterodactyl(commands.Cog): await self.config.guild(interaction.guild).server_id.set(self.server_id.value) message += f"Server ID set to `{self.server_id.value}`.\n" if message == "": - message = f"No changes were made.\nCurrent configuration:\n- Base URL: `{await self.config.guild(interaction.guild).base_url()}`\n- API Key: `{await self.config.guild(interaction.guild).api_key()}`\n- Server ID: `{await self.config.guild(interaction.guild).server_id()}`" - await interaction.response.send_message(message, ephemeral=True) + send = f"No changes were made.\nCurrent configuration:\n- Base URL: `{await self.config.guild(interaction.guild).base_url()}`\n- API Key: `{await self.config.guild(interaction.guild).api_key()}`\n- Server ID: `{await self.config.guild(interaction.guild).server_id()}`" + else: + send = f"Configuration changed:\n{message}" + await interaction.response.send_message(send, ephemeral=True) class StartupConfigModal(discord.ui.Modal, title="Pterodactyl Manager Configuration"): def __init__(self, config): @@ -237,5 +239,7 @@ class Pterodactyl(commands.Cog): 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" if message == "": - message = f"No changes were made.\nCurrent configuration:\n- Startup jar: `{await self.config.guild(interaction.guild).startup_jar()}`\n- Startup arguments:\n```{await self.config.guild(interaction.guild).startup_arguments()}```" - await interaction.response.send_message(message, ephemeral=True) + send = f"No changes were made.\nCurrent configuration:\n- Startup jar: `{await self.config.guild(interaction.guild).startup_jar()}`\n- Startup arguments:\n```{await self.config.guild(interaction.guild).startup_arguments()}```" + else: + send = f"Configuration changed:\n{message}" + await interaction.response.send_message(send, ephemeral=True)