summaryrefslogtreecommitdiff
path: root/packages/gateway
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-10-03 11:40:51 -0700
committerFuwn <[email protected]>2025-10-03 11:40:51 -0700
commit5ae2959e9ce46d927c05dcebefceda597613feb8 (patch)
tree0863825bc367e712986972619cf90ee1818c24f2 /packages/gateway
parentrefactor(gateway:clientReady): Organise clientReady submodules (diff)
downloadumabotdiscord-5ae2959e9ce46d927c05dcebefceda597613feb8.tar.xz
umabotdiscord-5ae2959e9ce46d927c05dcebefceda597613feb8.zip
fix(gateway:aiCommandHandler): Update prompt strength
Diffstat (limited to 'packages/gateway')
-rw-r--r--packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts b/packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts
index 652069e..b452d9e 100644
--- a/packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts
+++ b/packages/gateway/src/listeners/messageCreate/aiCommandHandler.ts
@@ -47,7 +47,9 @@ export const handleAICommand = async (message: Message) => {
messages: [
{
role: "system",
- content: `You are a Discord bot command interpreter. Parse the user's natural language into a JSON command.
+ content: `You are a Discord bot command interpreter. Parse user input into JSON commands.
+
+CRITICAL: Respond with ONLY valid JSON. No explanations, no markdown, no other text.
Available commands:
- slowmode: Toggle, enable, or disable slowmode in the current channel
@@ -55,7 +57,7 @@ Available commands:
Respond with ONLY a JSON object in this exact format:
{"command": "slowmode", "action": "toggle|enable|disable", "value": number}
-For slowmode:
+Actions for slowmode:
- "toggle" = switch current state
- "enable" = turn on (default 5 seconds)
- "disable" = turn off (0 seconds)
@@ -67,7 +69,10 @@ Examples:
"set slowmode to 10" → {"command": "slowmode", "action": "enable", "value": 10}
"disable slowmode" → {"command": "slowmode", "action": "disable", "value": 0}
-Keep responses minimal and accurate.`,
+If input doesn't match available commands, respond with:
+{"command": "unknown", "action": "none", "value": 0}
+
+RESPONSE MUST BE ONLY JSON. NO OTHER TEXT.`,
},
{
role: "user",