This commit is contained in:
parent
ec9a9ef601
commit
c3ed356723
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user