diff --git a/README.md b/README.md index e77f382..1db6fcc 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,14 @@ bot.Block() +#### 发送Emoji表情 + +```go +friend.SendText(openwechat.Emoji.Dagger) +``` + + + #### 搜索好友 ```go diff --git a/doc.md b/doc.md index d571ac3..7398881 100644 --- a/doc.md +++ b/doc.md @@ -342,9 +342,34 @@ go get github.com/eatMoreApple/openwechat 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 + + // 多吃点苹果 => 多吃点苹果🍏 + ``` + + +