Compare commits

...

2 Commits

Author SHA1 Message Date
fef88df67e chore(release): publish
- @egg/lark-msg-tool@1.17.0
2024-11-27 11:52:52 +00:00
c3ed356723 feat(lark-msg-tool): 添加判断是否艾特机器人的方法
All checks were successful
/ release (push) Successful in 32s
2024-11-27 11:52:20 +00:00
4 changed files with 19 additions and 2 deletions

2
package-lock.json generated
View File

@ -12373,7 +12373,7 @@
},
"packages/lark-msg-tool": {
"name": "@egg/lark-msg-tool",
"version": "1.16.0",
"version": "1.17.0",
"license": "ISC",
"dependencies": {
"@egg/logger": "^1.6.0",

View File

@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.17.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/lark-msg-tool@1.16.0...@egg/lark-msg-tool@1.17.0) (2024-11-27)
### Features
- **lark-msg-tool:** 添加判断是否艾特机器人的方法 ([c3ed356](http://yingbo.im:3000/zhaoyingbo/egg_tools/commits/c3ed356723ed88e1f0a68902d6db6d0e2cda2322))
# [1.16.0](http://yingbo.im:3000/zhaoyingbo/egg_tools/compare/@egg/lark-msg-tool@1.15.1...@egg/lark-msg-tool@1.16.0) (2024-11-27)
### Features

View File

@ -1,6 +1,6 @@
{
"name": "@egg/lark-msg-tool",
"version": "1.16.0",
"version": "1.17.0",
"description": "Lark Msg Tools for Egg projects",
"type": "module",
"main": "src/index.ts",

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