MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / stripBotMention

Function stripBotMention

server/src/addie/security.ts:165–167  ·  view source on GitHub ↗
(text: string, botUserId: string)

Source from the content-addressed store, hash-verified

163 * Strip bot mention from message text
164 */
165export function stripBotMention(text: string, botUserId: string): string {
166 return text.replace(new RegExp(`<@${botUserId}>`, 'g'), '').trim();
167}
168
169/**
170 * Resolve Slack user mentions to include names for better LLM understanding.

Callers 1

handleAppMentionFunction · 0.85

Calls 1

trimMethod · 0.65

Tested by

no test coverage detected