diff --git a/source/bot.md b/source/bot.md index d02d223..a989d1b 100644 --- a/source/bot.md +++ b/source/bot.md @@ -90,7 +90,7 @@ bot.HotLogin(reloadStorage) ```go // 热登陆存储接口 -type HotReloadStorage io.ReadWriteCloser +type HotReloadStorage io.ReadWriter ``` `NewJsonFileHotReloadStorage`简单实现了该接口,它采用`JSON`的方式存储会话信息。 diff --git a/source/message.md b/source/message.md index c50e37b..d3d99f1 100644 --- a/source/message.md +++ b/source/message.md @@ -28,7 +28,7 @@ msg.Content // 获取消息内容 通过访问`Content`属性可直接获取消息内容 -由于消息分为很多种类型,它们都共用`Content`属性。一般当消息类型问文本类型的时候,我们才会去访问`Content`属性。 +由于消息分为很多种类型,它们都共用`Content`属性。一般当消息类型为文本类型的时候,我们才会去访问`Content`属性。 @@ -60,7 +60,7 @@ msg.IsMap() msg.IsVoice() ``` -##### 添加好友请求 +##### 是否为好友添加请求 ```go msg.IsFriendAdd() @@ -108,6 +108,18 @@ msg.IsSendRedPacket() msg.IsReceiveRedPacket() ``` +##### 判断是否为拍一拍 + +```go +msg.IsIsPaiYiPai() // 拍一拍消息 +msg.IsTickled() +``` + +##### 判断是否有新人加入群聊 +```go +msg.IsJoinGroup() +``` + 但是不能领取! diff --git a/source/user.md b/source/user.md index 669bc04..e57ea38 100644 --- a/source/user.md +++ b/source/user.md @@ -188,7 +188,7 @@ self.SendImageToFriend(friend, img) ```go file, _ := os.Open("your file path") -defer img.Close() +defer file.Close() self.SendFileToFriend(friend, file) // 或者 // friend.SendFile(img)