diff --git a/CHANGELOG.md b/CHANGELOG.md index 478ebd9..a08b8bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ### Fixed +- Prevent dynamic bot names in `!help` responses from triggering Discord mentions. - Preserve embed titles, descriptions, and URLs in live MCP `read-messages` results. - Prevent `!guild` server-memory responses from triggering Discord mentions from stored memory or server names. - Verify recent, legacy, and full-text-search history reads before assembling model context; reject symbolic-link files and replaced storage directories. diff --git a/src/discord/commands/help.ts b/src/discord/commands/help.ts index 01f8bd9..9c6c4fb 100644 --- a/src/discord/commands/help.ts +++ b/src/discord/commands/help.ts @@ -42,5 +42,8 @@ export async function handleHelp(msg: Message): Promise { `• If I don't think a message needs a reply, I'll just leave a reaction`, ].join("\n"); - await msg.reply(help); + await msg.reply({ + content: help, + allowedMentions: { parse: [] }, + }); } diff --git a/tests/responseWorkload.test.mjs b/tests/responseWorkload.test.mjs index a8d000f..1b85ee1 100644 --- a/tests/responseWorkload.test.mjs +++ b/tests/responseWorkload.test.mjs @@ -161,15 +161,16 @@ test("responses route through response settings and report the response model", /Never become hostile, defensive, contemptuous, or insulting/, ); - let helpReply = ""; + let helpReply; await handleHelp({ author: { id: "user-1" }, - reply: async (content) => { - helpReply = content; + reply: async (options) => { + helpReply = options; }, }); - assert.match(helpReply, /powered by `response-model`/); - assert.doesNotMatch(helpReply, /global-model/); + assert.match(helpReply.content, /powered by `response-model`/); + assert.doesNotMatch(helpReply.content, /global-model/); + assert.deepEqual(helpReply.allowedMentions, { parse: [] }); }); test("adaptive routing keeps Sonnet while lowering a simple response effort", async () => {