Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update user.md 修改一下变量名称 #421

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions source/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ self, err := bot.GetCurrentUser()
#### 获取当前用户的所有的好友

```go
firends, err := self.Friends() // self.Friends(true)
Friends, err := self.Friends() // self.Friends(true)
```

`Friends`:可接受`bool`值来判断是否获取最新的好友
Expand Down Expand Up @@ -162,7 +162,7 @@ func (s *Self) SendTextToFriend(friend *Friend, text string) (*SentMessage, erro
```

```go
firends, err := self.Friends()
Friends, err := self.Friends()

if err != nil {
return
Expand Down Expand Up @@ -332,7 +332,7 @@ type Friends []*Friend
#### 获取当前用户的好友列表

```go
firends, err := self.Friends()
Friends, err := self.Friends()
```

注:此时获取到的`friends`为好友组,而非好友。好友组是当前wx号所有好友的集合。
Expand All @@ -342,7 +342,7 @@ firends, err := self.Friends()
#### 统计好友个数

```go
firends.Count() // => int
Friends.Count() // => int
```


Expand All @@ -359,7 +359,7 @@ func (f Friends) Search(limit int, condFuncList ...func(friend *Friend) bool) (r

```go
// 例:查询昵称为eatmoreapple的1个好友
sult := firends.Search(1, func(friend *openwechat.Friend) bool {return friend.NickName == "eatmoreapple"})
sult := Friends.Search(1, func(friend *openwechat.Friend) bool {return friend.NickName == "eatmoreapple"})
```


Expand Down