update readme.md

This commit is contained in:
eatMoreApple 2021-04-26 13:17:09 +08:00
parent e93df31dad
commit 7d93aa7b3a
2 changed files with 33 additions and 0 deletions

View File

@ -144,6 +144,14 @@ bot.Block()
#### 发送Emoji表情
```go
friend.SendText(openwechat.Emoji.Dagger)
```
#### 搜索好友 #### 搜索好友
```go ```go

25
doc.md
View File

@ -342,9 +342,34 @@ go get github.com/eatMoreApple/openwechat
func (m *Message) Get(key string) (value interface{}, exist bool) func (m *Message) Get(key string) (value interface{}, exist bool)
``` ```
### Emoji
可支持发送emoji表情所有的`emoji`表情维护在`openwechat.Emoji`这个匿名结构体里面
```go
friend.SendText(openwechat.Emoji.Hungry)
```
昵称格式化
* `FormatEmoji`:该方法可以格式化带有`emoji`表情的用户昵称
```go
func FormatEmoji(text string) string
// 多吃点苹果<span class="emoji emoji1f34f"></span> => 多吃点苹果🍏
```