feat: 过滤掉被艾特的机器人

This commit is contained in:
zhaoyingbo 2024-12-02 03:23:15 +00:00
parent 4a88bf6aa3
commit dc958d4765

View File

@ -44,7 +44,9 @@ const agent = async (ctx: Context.Data) => {
let userInput = rawMsgText
for (const mention of mentions ?? []) {
if (mention.id.user_id) {
userInput = userInput.replace(mention.key, mention.name)
userInput = userInput.replace(mention.key, `@${mention.name}`)
} else {
userInput = userInput.replace(mention.key, "")
}
}