From 71d71b47738622d5d59cc4c95402d8514f5beea1 Mon Sep 17 00:00:00 2001 From: Kingston-SCYD Date: Sun, 16 Aug 2026 23:51:38 -0500 Subject: [PATCH] Add showprompt command (admin only) to display full system prompt --- assistant/assistant.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/assistant/assistant.py b/assistant/assistant.py index e3bebf4..5be7ebe 100644 --- a/assistant/assistant.py +++ b/assistant/assistant.py @@ -380,6 +380,18 @@ class Assistant(commands.Cog): await self.config.guild(ctx.guild).system_prompt.set(prompt) await ctx.send("System prompt updated.") + @assistant.command(name="showprompt") + @checks.admin_or_permissions(manage_guild=True) + async def assistant_showprompt(self, ctx: commands.Context): + """Show the full system prompt (admin only).""" + prompt = await self.config.guild(ctx.guild).system_prompt() + if len(prompt) <= 2000: + await ctx.send(f"```\n{prompt}\n```") + else: + chunks = [prompt[i:i + 1990] for i in range(0, len(prompt), 1990)] + for chunk in chunks: + await ctx.send(f"```\n{chunk}\n```") + @assistant.command(name="question") async def assistant_question(self, ctx: commands.Context): """Toggle question mode (messages must end with ?)."""