feat(lark-msg-tool): 添加判断是否艾特机器人的方法
All checks were successful
/ release (push) Successful in 32s

This commit is contained in:
zhaoyingbo 2024-11-27 11:52:20 +00:00
parent ec9a9ef601
commit c3ed356723

View File

@ -212,6 +212,17 @@ class LarkBody {
if (this.getIsAction(body)) return body?.open_message_id
return ""
}
/**
*
* @param name
* @returns
*/
public isAtBot(name: string) {
if (!this.mentions) return false
if (!this.isInGroup) return false
return this.mentions.some((m) => m.name === name)
}
}
export default LarkBody