Documentation
¶
Index ¶
Constants ¶
View Source
const ( HeartBeat = 5005 RecvTxtMsg = 1 //接收文本消息 RecvPicMsg = 3 //接收图片消息 UserList = 5000 GetUserListSuccsess = 5001 GetUserListFail = 5002 TxtMsg = 555 PicMsg = 500 AtMsg = 550 //const CHATROOM_MEMBER = 5010;//废弃 ChatroomMemberNick = 5020 PersonalInfo = 6500 DebugSwitch = 6000 PersonalDetail = 6550 DestroyAll = 9999 NewFriendRequest = 37 AgreeToFriendRequest = 10000 //同意微信好友请求消息 )
Variables ¶
This section is empty.
Functions ¶
func NewHTTPBot ¶
func NewHTTPBot(prefix string) *httpBot
func NewWebsocketBot ¶
func NewWebsocketBot(url string) *websocketBot
Types ¶
type Bot ¶
type Bot interface {
//群聊发送 @member 消息
SendAtMsg(content, roomId, atWxId, nick string) error
//发送文本消息
SendTxtMsg(content, wxId string) error
//发送图片
SendPic(wxId, filePath string) error
//发送附件
SendAttach(wxId, filePath string) error
//获取群成员昵称
GetMemberNick(roomId string) (res []*Member, err error)
//获取群成员 id
GetMemberId() (resp interface{}, err error)
//获取微信通讯录好友和群列表
GetContactList() (res []*Friend, err error)
//刷新好友列表
RefreshMemberList() error
//动态卸载 ddl
SendDestroy() error
}
type GetContactList ¶
type GetMemberList ¶
type WrapperAtMsg ¶
type WrapperAtMsg struct {
WrapperMsg
RoomId string `json:"roomid"`
NickName string `json:"nickname"`
}
func NewWrapperAtMsg ¶
func NewWrapperAtMsg(wrapperMsg WrapperMsg, roomId string, nickName string) *WrapperAtMsg
type WrapperMsg ¶
type WrapperMsg struct {
Id string `json:"id"`
MsgType int64 `json:"type"`
Content string `json:"content"`
WxId string `json:"wxid"`
}
func NewWrapperMsg ¶
func NewWrapperMsg(msgType int64, content string, wxId string) *WrapperMsg
Click to show internal directories.
Click to hide internal directories.