Initial commit: Discord-Claude Gateway with event-driven agent runtime
This commit is contained in:
@@ -21,7 +21,10 @@ export function shouldIgnoreMessage(message: { author: { bot: boolean } }): bool
|
||||
}
|
||||
|
||||
export function extractPromptFromMention(content: string, botId: string): string {
|
||||
return content.replace(new RegExp(`<@!?${botId}>`, "g"), "").trim();
|
||||
// Remove user mentions (<@ID> or <@!ID>) and role mentions (<@&ID>) for the bot
|
||||
return content
|
||||
.replace(/<@[!&]?\d+>/g, "")
|
||||
.trim();
|
||||
}
|
||||
|
||||
export class DiscordBot {
|
||||
|
||||
Reference in New Issue
Block a user