Skip to content

Commit

Permalink
Update contact.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aherman3 authored Mar 26, 2024
1 parent 91afb11 commit d226568
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const name = contact.name()
| :--- | :--- |
| newAlias | `undefined` \| `string` \| `null` |

### 示例 \( 获取contact的备注, return {\(Promise<string \| null>\)}\)
### 示例 \( 获取contact的备注, 返回 {\(Promise<string \| null>\)}\)

```javascript
const alias = await contact.alias()
Expand Down Expand Up @@ -161,7 +161,7 @@ try {

### Contact.friend\(\)`boolean` \| `null`

判断这个联系人是否为机器人的好友。Returns: `boolean``null`, 是friend, return`true`,不是friend, return`false``null`是unknown
判断这个联系人是否为机器人的好友。返回类型: `boolean``null`, 是friend, 返回`true`,不是friend, 返回`false``null`是unknown

> 备注: 这个方法是否能实现,取决于用的是什么Puppet, 参照 [puppet-compatible-table](https://wechaty.js.org/docs/specs/puppet/)
Expand Down Expand Up @@ -255,7 +255,7 @@ const isSelf = contact.self()

### Contact.find\(query\)`Promise <Contact | null>`

通过类似这样的命令查找联系人: {name: string \| RegExp} / {alias: string \| RegExp}。支持通过昵称或者备注查找。如果查到不止一个联系人,返回找到的第一个。能找contact, return `Promise`, 没有contact, return `null`.
通过类似这样的命令查找联系人: {name: string \| RegExp} / {alias: string \| RegExp}。支持通过昵称或者备注查找。如果查到不止一个联系人,返回找到的第一个。能找contact, 返回 `Promise`, 没有contact, 返回 `null`.

| Param | Type |
| :--- | :--- |
Expand Down

0 comments on commit d226568

Please sign in to comment.