Versions in this module Expand all Collapse all v0 v0.0.1 May 24, 2023 Changes in this version + const ALL + const AppMessage + const FEMALE + const FileHelper + const MALE + const TimeFormat + var Desktop = withMode(desktop) + var DoNothingBotLoginOption = &BaseBotLoginOption + var Emoji = struct{ ... } + var ErrForbidden = errors.New("login forbidden") + var ErrInvalidStorage = errors.New("invalid storage") + var ErrLoginTimeout = errors.New("login timeout") + var ErrNoSuchUserFoundError = errors.New("no such user found") + var ErrUserLogout = errors.New("user logout") + var ErrWebWxDataTicketNotFound = errors.New("webwx_data_ticket not found") + var NetworkErr = errors.New("wechat network error") + var Normal = withMode(normal) + func FormatEmoji(text string) string + func GetFileContentType(file multipart.File) (string, error) + func GetQrcodeUrl(uuid string) string + func GetRandomDeviceId() string + func IgnoreNetworkError(errHandler func(err error)) func(error) + func IsNetworkError(err error) bool + func NewFileAppMessage(stat os.FileInfo, attachId string) *appmsg + func NewFileHotReloadStorage(filename string) io.ReadWriteCloser + func NewJsonFileHotReloadStorage(filename string) io.ReadWriteCloser + func PrintlnQrcodeUrl(uuid string) + type AppMessageData struct + AppInfo struct{ ... } + AppMsg struct{ ... } + CommentUrl string + FromUsername string + Scene string + XMLName xml.Name + func (a *AppMessageData) IsArticle() bool + func (a *AppMessageData) IsFromApplet() bool + func (a AppMessageData) IsFile() bool + type AppMessageType int + const AppMsgTypeAttach + const AppMsgTypeAudio + const AppMsgTypeCardTicket + const AppMsgTypeEmoji + const AppMsgTypeEmotion + const AppMsgTypeGood + const AppMsgTypeImg + const AppMsgTypeOpen + const AppMsgTypeReaderType + const AppMsgTypeRealtimeShareLocation + const AppMsgTypeRedEnvelopes + const AppMsgTypeScanGood + const AppMsgTypeText + const AppMsgTypeTransfers + const AppMsgTypeUrl + const AppMsgTypeVideo + const AppMsgTypeVoiceRemind + func (i AppMessageType) String() string + type BaseBotLoginOption struct + func (BaseBotLoginOption) OnError(_ *Bot, err error) error + func (BaseBotLoginOption) OnSuccess(_ *Bot) error + func (BaseBotLoginOption) Prepare(_ *Bot) + type BaseRequest struct + DeviceID string + Sid string + Skey string + Uin int64 + type BaseResponse struct + ErrMsg string + Ret Ret + func (b BaseResponse) Err() error + func (b BaseResponse) Ok() bool + type Bot struct + Caller *Caller + LoginCallBack func(body CheckLoginResponse) + LogoutCallBack func(bot *Bot) + MessageErrorHandler MessageErrorHandler + MessageHandler MessageHandler + ScanCallBack func(body CheckLoginResponse) + Serializer Serializer + Storage *Session + SyncCheckCallback func(resp SyncCheckResponse) + UUIDCallback func(uuid string) + func DefaultBot(prepares ...BotPreparer) *Bot + func NewBot(c context.Context) *Bot + func (b *Bot) Alive() bool + func (b *Bot) Block() error + func (b *Bot) Context() context.Context + func (b *Bot) CrashReason() error + func (b *Bot) DumpHotReloadStorage() error + func (b *Bot) DumpTo(writer io.Writer) error + func (b *Bot) Exit() + func (b *Bot) ExitWith(err error) + func (b *Bot) GetCurrentUser() (*Self, error) + func (b *Bot) HotLogin(storage HotReloadStorage, opts ...BotLoginOption) error + func (b *Bot) IsHot() bool + func (b *Bot) Login() error + func (b *Bot) Logout() error + func (b *Bot) PushLogin(storage HotReloadStorage, opts ...BotLoginOption) error + func (b *Bot) SetHotStorage(storage HotReloadStorage) + func (b *Bot) UUID() string + type BotLogin interface + Login func(bot *Bot) error + type BotLoginOption interface + OnError func(*Bot, error) error + OnSuccess func(*Bot) error + func HotLoginWithRetry(flag bool) BotLoginOption + func NewRetryLoginOption() BotLoginOption + func PushLoginWithRetry(flag bool) BotLoginOption + type BotOptionGroup []BotLoginOption + func (g BotOptionGroup) OnError(b *Bot, err error) error + func (g BotOptionGroup) OnSuccess(b *Bot) error + func (g BotOptionGroup) Prepare(bot *Bot) + type BotPreparer interface + Prepare func(*Bot) + func WithContextOption(ctx context.Context) BotPreparer + func WithDeviceID(deviceId string) BotPreparer + func WithUUIDOption(uuid string) BotPreparer + type BotPreparerFunc func(*Bot) + func (f BotPreparerFunc) Prepare(b *Bot) + type Caller struct + Client *Client + func DefaultCaller() *Caller + func NewCaller(client *Client) *Caller + func (c *Caller) AddFriendIntoChatRoom(req *BaseRequest, info *LoginInfo, group *Group, friends ...*Friend) error + func (c *Caller) CheckLogin(uuid, tip string) (CheckLoginResponse, error) + func (c *Caller) GetLoginInfo(path *url.URL) (*LoginInfo, error) + func (c *Caller) GetLoginUUID() (string, error) + func (c *Caller) Logout(info *LoginInfo) error + func (c *Caller) RemoveFriendFromChatRoom(req *BaseRequest, info *LoginInfo, group *Group, users ...*User) error + func (c *Caller) SyncCheck(request *BaseRequest, info *LoginInfo, response *WebInitResponse) (*SyncCheckResponse, error) + func (c *Caller) UploadMedia(file *os.File, request *BaseRequest, info *LoginInfo, ...) (*UploadResponse, error) + func (c *Caller) WebInit(request *BaseRequest) (*WebInitResponse, error) + func (c *Caller) WebWxBatchGetContact(members Members, request *BaseRequest) (Members, error) + func (c *Caller) WebWxCreateChatRoom(request *BaseRequest, info *LoginInfo, topic string, friends Friends) (*Group, error) + func (c *Caller) WebWxGetContact(info *LoginInfo) (Members, error) + func (c *Caller) WebWxOplog(request *BaseRequest, remarkName, toUserName string) error + func (c *Caller) WebWxPushLogin(uin int64) (*PushLoginResponse, error) + func (c *Caller) WebWxRelationPin(request *BaseRequest, user *User, op uint8) error + func (c *Caller) WebWxRenameChatRoom(request *BaseRequest, info *LoginInfo, newTopic string, group *Group) error + func (c *Caller) WebWxRevokeMsg(msg *SentMessage, request *BaseRequest) error + func (c *Caller) WebWxSendAppMsg(msg *SendMessage, req *BaseRequest) (*SentMessage, error) + func (c *Caller) WebWxSendFile(reader io.Reader, req *BaseRequest, info *LoginInfo, ...) (*SentMessage, error) + func (c *Caller) WebWxSendImageMsg(reader io.Reader, request *BaseRequest, info *LoginInfo, ...) (*SentMessage, error) + func (c *Caller) WebWxSendMsg(msg *SendMessage, info *LoginInfo, request *BaseRequest) (*SentMessage, error) + func (c *Caller) WebWxSendVideoMsg(reader io.Reader, request *BaseRequest, info *LoginInfo, ...) (*SentMessage, error) + func (c *Caller) WebWxStatusAsRead(request *BaseRequest, info *LoginInfo, msg *Message) error + func (c *Caller) WebWxStatusNotify(request *BaseRequest, response *WebInitResponse, info *LoginInfo) error + func (c *Caller) WebWxSync(request *BaseRequest, response *WebInitResponse, info *LoginInfo) (*WebWxSyncResponse, error) + func (c *Caller) WebWxVerifyUser(session *Session, info RecommendInfo, verifyContent string) error + type Card struct + Alias string + BigHeadImgUrl string + BrandFlags string + BrandHomeUr string + BrandIconUrl string + BrandSubscriptConfigUrl string + Certflag int + Certinfo string + City string + ImageStatus int + NickName string + Province string + RegionCode string + Scene int + Sex int + ShortPy string + Sign string + SmallHeadImgUrl string + UserName string + XMLName xml.Name + type CheckLoginResponse []byte + func (c CheckLoginResponse) Avatar() (string, error) + func (c CheckLoginResponse) Code() (LoginCode, error) + func (c CheckLoginResponse) RedirectURL() (*url.URL, error) + type Client struct + Domain WechatDomain + HttpHooks HttpHooks + MaxRetryTimes int + func DefaultClient() *Client + func NewClient() *Client + func (c *Client) AddHttpHook(hooks ...HttpHook) + func (c *Client) AddMemberIntoChatRoom(req *BaseRequest, info *LoginInfo, group *Group, friends ...*Friend) (*http.Response, error) + func (c *Client) CheckLogin(uuid, tip string) (*http.Response, error) + func (c *Client) Do(req *http.Request) (*http.Response, error) + func (c *Client) GetLoginInfo(path *url.URL) (*http.Response, error) + func (c *Client) GetLoginQrcode(uuid string) (*http.Response, error) + func (c *Client) GetLoginUUID() (*http.Response, error) + func (c *Client) HTTPClient() *http.Client + func (c *Client) InviteMemberIntoChatRoom(req *BaseRequest, info *LoginInfo, group *Group, friends ...*Friend) (*http.Response, error) + func (c *Client) Jar() http.CookieJar + func (c *Client) Logout(info *LoginInfo) (*http.Response, error) + func (c *Client) RemoveMemberFromChatRoom(req *BaseRequest, info *LoginInfo, group *Group, friends ...*User) (*http.Response, error) + func (c *Client) SetCookieJar(jar *Jar) + func (c *Client) SetMode(mode Mode) + func (c *Client) SyncCheck(request *BaseRequest, info *LoginInfo, response *WebInitResponse) (*http.Response, error) + func (c *Client) WebInit(request *BaseRequest) (*http.Response, error) + func (c *Client) WebWxBatchGetContact(members Members, request *BaseRequest) (*http.Response, error) + func (c *Client) WebWxCreateChatRoom(request *BaseRequest, info *LoginInfo, topic string, friends Friends) (*http.Response, error) + func (c *Client) WebWxGetContact(info *LoginInfo, reqs int64) (*http.Response, error) + func (c *Client) WebWxGetHeadImg(user *User) (*http.Response, error) + func (c *Client) WebWxGetMedia(msg *Message, info *LoginInfo) (*http.Response, error) + func (c *Client) WebWxGetMsgImg(msg *Message, info *LoginInfo) (*http.Response, error) + func (c *Client) WebWxGetVideo(msg *Message, info *LoginInfo) (*http.Response, error) + func (c *Client) WebWxGetVoice(msg *Message, info *LoginInfo) (*http.Response, error) + func (c *Client) WebWxOplog(request *BaseRequest, remarkName, userName string) (*http.Response, error) + func (c *Client) WebWxPushLogin(uin int64) (*http.Response, error) + func (c *Client) WebWxRelationPin(request *BaseRequest, op uint8, user *User) (*http.Response, error) + func (c *Client) WebWxRenameChatRoom(request *BaseRequest, info *LoginInfo, newTopic string, group *Group) (*http.Response, error) + func (c *Client) WebWxRevokeMsg(msg *SentMessage, request *BaseRequest) (*http.Response, error) + func (c *Client) WebWxSendAppMsg(msg *SendMessage, request *BaseRequest) (*http.Response, error) + func (c *Client) WebWxSendMsg(msg *SendMessage, info *LoginInfo, request *BaseRequest) (*http.Response, error) + func (c *Client) WebWxSendMsgImg(msg *SendMessage, request *BaseRequest, info *LoginInfo) (*http.Response, error) + func (c *Client) WebWxSendVideoMsg(request *BaseRequest, msg *SendMessage) (*http.Response, error) + func (c *Client) WebWxStatusAsRead(request *BaseRequest, info *LoginInfo, msg *Message) (*http.Response, error) + func (c *Client) WebWxStatusNotify(request *BaseRequest, response *WebInitResponse, info *LoginInfo) (*http.Response, error) + func (c *Client) WebWxSync(request *BaseRequest, response *WebInitResponse, info *LoginInfo) (*http.Response, error) + func (c *Client) WebWxUploadMediaByChunk(file *os.File, request *BaseRequest, info *LoginInfo, ...) (*http.Response, error) + func (c *Client) WebWxVerifyUser(session *Session, info RecommendInfo, verifyContent string) (*http.Response, error) + type CookieGroup []*http.Cookie + func (c CookieGroup) GetByName(cookieName string) (cookie *http.Cookie, exist bool) + type Friend struct + func NewFriendHelper(self *Self) *Friend + func (f *Friend) AddIntoGroup(groups ...*Group) error + func (f *Friend) SendFile(file io.Reader) (*SentMessage, error) + func (f *Friend) SendImage(file io.Reader) (*SentMessage, error) + func (f *Friend) SendText(content string) (*SentMessage, error) + func (f *Friend) SendVideo(file io.Reader) (*SentMessage, error) + func (f *Friend) SetRemarkName(name string) error + func (f *Friend) String() string + type FriendAddMessage struct + AlbumBgImgId string + AlbumFlag int + AlbumStyle int + Alias string + BigHeadImgUrl string + BrandList struct{ ... } + CardVersion string + ChatRoomUserName string + City string + Content string + Country string + EncryptUserName string + FromNickName string + FromUserName string + GoogleContact string + ImageStatus int + MFullHash string + MHash string + Opcode int + PerCard int + Province string + QrTicket string + Scene int + Sex int + ShareCardNickName string + ShareCardUserName string + Shortpy string + Sign string + SmallHeadImgUrl string + SnsBgImgId string + SnsBgObjectId string + SnsFlag int + SourceUserName string + Ticket string + WeiBo string + XMLName xml.Name + type Friends []*Friend + func (f Friends) AsMembers() Members + func (f Friends) Count() int + func (f Friends) First() *Friend + func (f Friends) GetByNickName(nickname string) *Friend + func (f Friends) GetByRemarkName(remarkName string) *Friend + func (f Friends) GetByUsername(username string) *Friend + func (f Friends) Last() *Friend + func (f Friends) Search(limit int, searchFuncList ...func(friend *Friend) bool) (results Friends) + func (f Friends) SearchByID(id string) Friends + func (f Friends) SearchByNickName(limit int, nickName string) (results Friends) + func (f Friends) SearchByRemarkName(limit int, remarkName string) (results Friends) + func (f Friends) SearchByUserName(limit int, username string) (results Friends) + func (f Friends) SendFile(file io.Reader, delay ...time.Duration) error + func (f Friends) SendImage(file io.Reader, delays ...time.Duration) error + func (f Friends) SendText(text string, delays ...time.Duration) error + func (f Friends) Sort() Friends + func (f Friends) Uniq() Friends + type Group struct + func (g *Group) AddFriendsIn(friends ...*Friend) error + func (g *Group) Members() (Members, error) + func (g *Group) RemoveMembers(members Members) error + func (g *Group) Rename(name string) error + func (g *Group) SearchMemberByUsername(username string) (*User, error) + func (g *Group) SendFile(file io.Reader) (*SentMessage, error) + func (g *Group) SendImage(file io.Reader) (*SentMessage, error) + func (g *Group) SendText(content string) (*SentMessage, error) + func (g *Group) SendVideo(file io.Reader) (*SentMessage, error) + func (g *Group) String() string + type Groups []*Group + func (g Groups) AsMembers() Members + func (g Groups) Count() int + func (g Groups) First() *Group + func (g Groups) GetByNickName(nickname string) *Group + func (g Groups) GetByUsername(username string) *Group + func (g Groups) Last() *Group + func (g Groups) Search(limit int, searchFuncList ...func(group *Group) bool) (results Groups) + func (g Groups) SearchByID(id string) Groups + func (g Groups) SearchByNickName(limit int, nickName string) (results Groups) + func (g Groups) SearchByUserName(limit int, username string) (results Groups) + func (g Groups) SendFile(file io.Reader, delay ...time.Duration) error + func (g Groups) SendImage(file io.Reader, delay ...time.Duration) error + func (g Groups) SendText(text string, delay ...time.Duration) error + func (g Groups) Sort() Groups + func (g Groups) Uniq() Groups + type HotLogin struct + func (h *HotLogin) Login(bot *Bot) error + type HotReloadStorage io.ReadWriter + type HotReloadStorageItem struct + BaseRequest *BaseRequest + Jar *Jar + LoginInfo *LoginInfo + SyncKey *SyncKey + UUID string + WechatDomain WechatDomain + type HttpHook interface + AfterRequest func(response *http.Response, err error) + BeforeRequest func(req *http.Request) + type HttpHooks []HttpHook + type Jar struct + Entries map[string]map[string]entry + NextSeqNum uint64 + PsList cookiejar.PublicSuffixList + func NewJar() *Jar + func (j *Jar) AsCookieJar() http.CookieJar + type JsonSerializer struct + func (j JsonSerializer) Decode(reader io.Reader, v interface{}) error + func (j JsonSerializer) Encode(writer io.Writer, v interface{}) error + type LoginChecker struct + Bot *Bot + LoginCallBack func(body CheckLoginResponse) + ScanCallBack func(body CheckLoginResponse) + Tip string + UUIDCallback func(uuid string) + func (l *LoginChecker) CheckLogin() error + type LoginCode string + const LoginCodeScanned + const LoginCodeSuccess + const LoginCodeTimeout + const LoginCodeWait + func (l LoginCode) String() string + type LoginInfo struct + IsGrayScale int + Message string + PassTicket string + Ret int + SKey string + WxSid string + WxUin int64 + func (l LoginInfo) Err() error + func (l LoginInfo) Ok() bool + type MPArticle struct + Cover string + Digest string + Title string + Url string + type MPSubscribeMsg struct + MPArticleCount int + MPArticleList []*MPArticle + NickName string + Time int64 + UserName string + type MatchFunc func(*Message) bool + func MatchFuncList(matchFuncs ...MatchFunc) MatchFunc + func SenderFriendRequired() MatchFunc + func SenderGroupRequired() MatchFunc + func SenderMatchFunc(matchFuncs ...MessageSenderMatchFunc) MatchFunc + func SenderMpRequired() MatchFunc + func SenderNickNameContainsMatchFunc(nickname string) MatchFunc + func SenderNickNameEqualMatchFunc(nickname string) MatchFunc + func SenderRemakeNameContainsFunc(remakeName string) MatchFunc + func SenderRemarkNameEqualMatchFunc(remarkName string) MatchFunc + type Members []*User + func (m Members) Append(user *User) (results Members) + func (m Members) Count() int + func (m Members) Detail() error + func (m Members) First() *User + func (m Members) Friends() Friends + func (m Members) GetByNickName(nickname string) (*User, bool) + func (m Members) GetByRemarkName(remarkName string) (*User, bool) + func (m Members) GetByUserName(username string) (*User, bool) + func (m Members) Groups() Groups + func (m Members) Last() *User + func (m Members) MPs() Mps + func (m Members) Search(limit int, searchFuncList ...func(user *User) bool) (results Members) + func (m Members) SearchByNickName(limit int, nickName string) (results Members) + func (m Members) SearchByRemarkName(limit int, remarkName string) (results Members) + func (m Members) SearchByUserName(limit int, username string) (results Members) + func (m Members) Sort() Members + func (m Members) Uniq() Members + type Message struct + AppInfo struct{ ... } + AppMsgType AppMessageType + Content string + CreateTime int64 + EncryFileName string + FileName string + FileSize string + ForwardFlag int + FromUserName string + HasProductId int + ImgHeight int + ImgStatus int + ImgWidth int + MediaId string + MsgId string + MsgType MessageType + NewMsgId int64 + OriContent string + PlayLength int64 + Raw []byte + RawContent string + RecommendInfo RecommendInfo + Status int + StatusNotifyCode int + StatusNotifyUserName string + SubMsgType int + Ticket string + ToUserName string + Url string + VoiceLength int + func (m *Message) Agree(verifyContents ...string) (*Friend, error) + func (m *Message) AsRead() error + func (m *Message) Bot() *Bot + func (m *Message) Card() (*Card, error) + func (m *Message) Context() context.Context + func (m *Message) FriendAddMessageContent() (*FriendAddMessage, error) + func (m *Message) Get(key string) (value interface{}, exist bool) + func (m *Message) GetFile() (*http.Response, error) + func (m *Message) GetMedia() (*http.Response, error) + func (m *Message) GetPicture() (*http.Response, error) + func (m *Message) GetVideo() (*http.Response, error) + func (m *Message) GetVoice() (*http.Response, error) + func (m *Message) HasFile() bool + func (m *Message) IsArticle() bool + func (m *Message) IsAt() bool + func (m *Message) IsCard() bool + func (m *Message) IsComeFromGroup() bool + func (m *Message) IsEmoticon() bool + func (m *Message) IsFriendAdd() bool + func (m *Message) IsJoinGroup() bool + func (m *Message) IsLocation() bool + func (m *Message) IsMedia() bool + func (m *Message) IsNotify() bool + func (m *Message) IsPaiYiPai() bool + func (m *Message) IsPicture() bool + func (m *Message) IsRealtimeLocation() bool + func (m *Message) IsRealtimeLocationStart() bool + func (m *Message) IsRealtimeLocationStop() bool + func (m *Message) IsRecalled() bool + func (m *Message) IsReceiveRedPacket() bool + func (m *Message) IsRenameGroup() bool + func (m *Message) IsSendByFriend() bool + func (m *Message) IsSendByGroup() bool + func (m *Message) IsSendBySelf() bool + func (m *Message) IsSendRedPacket() bool + func (m *Message) IsSysNotice() bool + func (m *Message) IsSystem() bool + func (m *Message) IsText() bool + func (m *Message) IsTickled() bool + func (m *Message) IsTickledMe() bool + func (m *Message) IsTransferAccounts() bool + func (m *Message) IsVideo() bool + func (m *Message) IsVoice() bool + func (m *Message) IsVoipInvite() bool + func (m *Message) MediaData() (*AppMessageData, error) + func (m *Message) Owner() *Self + func (m *Message) Receiver() (*User, error) + func (m *Message) ReplyFile(file io.Reader) (*SentMessage, error) + func (m *Message) ReplyImage(file io.Reader) (*SentMessage, error) + func (m *Message) ReplyText(content string) (*SentMessage, error) + func (m *Message) ReplyVideo(file io.Reader) (*SentMessage, error) + func (m *Message) RevokeMsg() (*RevokeMsg, error) + func (m *Message) SaveFile(writer io.Writer) error + func (m *Message) SaveFileToLocal(filename string) error + func (m *Message) Sender() (*User, error) + func (m *Message) SenderInGroup() (*User, error) + func (m *Message) Set(key string, value interface{}) + func (m *Message) StatusNotify() bool + func (m *Message) String() string + func (m *Message) WithContext(ctx context.Context) *Message + type MessageContext struct + func (c *MessageContext) Abort() + func (c *MessageContext) AbortHandler() MessageContextHandler + func (c *MessageContext) IsAbort() bool + func (c *MessageContext) Next() + type MessageContextHandler func(ctx *MessageContext) + type MessageContextHandlerGroup []MessageContextHandler + type MessageDispatcher interface + Dispatch func(msg *Message) + type MessageErrorHandler func(err error) error + type MessageHandler func(msg *Message) + type MessageMatchDispatcher struct + func NewMessageMatchDispatcher() *MessageMatchDispatcher + func (m *MessageMatchDispatcher) AsMessageHandler() MessageHandler + func (m *MessageMatchDispatcher) Dispatch(msg *Message) + func (m *MessageMatchDispatcher) OnCard(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnEmoticon(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnFriend(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnFriendAdd(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnFriendByNickName(nickName string, handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnFriendByRemarkName(remarkName string, handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnGroup(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnGroupByGroupName(groupName string, handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnImage(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnMedia(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnText(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnUser(f func(user *User) bool, handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) OnVoice(handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) RegisterHandler(matchFunc MatchFunc, handlers ...MessageContextHandler) + func (m *MessageMatchDispatcher) SetAsync(async bool) + type MessageResponse struct + BaseResponse BaseResponse + LocalID string + MsgID string + type MessageResponseParser struct + Reader io.Reader + func (p *MessageResponseParser) Err() error + func (p *MessageResponseParser) MsgID() (string, error) + func (p *MessageResponseParser) SentMessage(msg *SendMessage) (*SentMessage, error) + type MessageSenderMatchFunc func(user *User) bool + type MessageType int + const MsgTypeApp + const MsgTypeEmoticon + const MsgTypeImage + const MsgTypeLocation + const MsgTypeMicroVideo + const MsgTypePossibleFriend + const MsgTypeRecalled + const MsgTypeShareCard + const MsgTypeSys + const MsgTypeText + const MsgTypeVerify + const MsgTypeVideo + const MsgTypeVoice + const MsgTypeVoip + const MsgTypeVoipInvite + const MsgTypeVoipNotify + func (i MessageType) String() string + type Mode interface + GetLoginInfo func(client *Client, path string) (*http.Response, error) + GetLoginUUID func(client *Client) (*http.Response, error) + PushLogin func(client *Client, uin int64) (*http.Response, error) + type Mp struct + func (m *Mp) SendFile(file io.Reader) (*SentMessage, error) + func (m *Mp) SendImage(file io.Reader) (*SentMessage, error) + func (m *Mp) SendText(content string) (*SentMessage, error) + func (m *Mp) String() string + type Mps []*Mp + func (m Mps) AsMembers() Members + func (m Mps) Count() int + func (m Mps) First() *Mp + func (m Mps) GetByNickName(nickname string) *Mp + func (m Mps) GetByUserName(username string) *Mp + func (m Mps) Last() *Mp + func (m Mps) Search(limit int, searchFuncList ...func(*Mp) bool) (results Mps) + func (m Mps) SearchByNickName(limit int, nickName string) (results Mps) + func (m Mps) SearchByUserName(limit int, userName string) (results Mps) + func (m Mps) Sort() Mps + func (m Mps) Uniq() Mps + type PushLogin struct + func (p *PushLogin) Login(bot *Bot) error + type PushLoginResponse struct + Msg string + Ret string + UUID string + func (p PushLoginResponse) Err() error + func (p PushLoginResponse) Ok() bool + type RecommendInfo struct + Alias string + AttrStatus int64 + City string + Content string + NickName string + OpCode int + Province string + QQNum int64 + Scene int + Sex int + Signature string + Ticket string + UserName string + VerifyFlag int + type Ret int + func (i Ret) String() string + func (r Ret) Error() string + type RetryLoginOption struct + MaxRetryCount int + func (r *RetryLoginOption) OnError(bot *Bot, err error) error + type RevokeMsg struct + RevokeMsg struct{ ... } + SysMsg xml.Name + Type string + type ScanLogin struct + UUID string + func (s *ScanLogin) Login(bot *Bot) error + type Selector string + const SelectorAddOrDelContact + const SelectorModChatRoom + const SelectorModContact + const SelectorNewMsg + const SelectorNormal + type Self struct + func (s *Self) AddFriendIntoManyGroups(friend *Friend, groups ...*Group) error + func (s *Self) AddFriendsIntoGroup(group *Group, friends ...*Friend) error + func (s *Self) Bot() *Bot + func (s *Self) ChkFrdGrpMpNil() bool + func (s *Self) ContactList() Members + func (s *Self) CreateGroup(topic string, friends ...*Friend) (*Group, error) + func (s *Self) FileHelper() *Friend + func (s *Self) ForwardMessageToFriends(msg *SentMessage, delay time.Duration, friends ...*Friend) error + func (s *Self) ForwardMessageToGroups(msg *SentMessage, delay time.Duration, groups ...*Group) error + func (s *Self) Friends(update ...bool) (Friends, error) + func (s *Self) Groups(update ...bool) (Groups, error) + func (s *Self) MPSubscribeList() []*MPSubscribeMsg + func (s *Self) Members(update ...bool) (Members, error) + func (s *Self) Mps(update ...bool) (Mps, error) + func (s *Self) RemoveMemberFromGroup(group *Group, members Members) error + func (s *Self) RenameGroup(group *Group, newName string) error + func (s *Self) RevokeMessage(msg *SentMessage) error + func (s *Self) SendFileToFriend(friend *Friend, file io.Reader) (*SentMessage, error) + func (s *Self) SendFileToFriends(file io.Reader, delay time.Duration, friends ...*Friend) error + func (s *Self) SendFileToGroup(group *Group, file io.Reader) (*SentMessage, error) + func (s *Self) SendFileToGroups(file io.Reader, delay time.Duration, groups ...*Group) error + func (s *Self) SendFileToMp(mp *Mp, file io.Reader) (*SentMessage, error) + func (s *Self) SendImageToFriend(friend *Friend, file io.Reader) (*SentMessage, error) + func (s *Self) SendImageToFriends(img io.Reader, delay time.Duration, friends ...*Friend) error + func (s *Self) SendImageToGroup(group *Group, file io.Reader) (*SentMessage, error) + func (s *Self) SendImageToGroups(img io.Reader, delay time.Duration, groups ...*Group) error + func (s *Self) SendImageToMp(mp *Mp, file io.Reader) (*SentMessage, error) + func (s *Self) SendTextToFriend(friend *Friend, text string) (*SentMessage, error) + func (s *Self) SendTextToFriends(text string, delay time.Duration, friends ...*Friend) error + func (s *Self) SendTextToGroup(group *Group, text string) (*SentMessage, error) + func (s *Self) SendTextToGroups(text string, delay time.Duration, groups ...*Group) error + func (s *Self) SendTextToMp(mp *Mp, text string) (*SentMessage, error) + func (s *Self) SendVideoToFriend(friend *Friend, file io.Reader) (*SentMessage, error) + func (s *Self) SendVideoToFriends(video io.Reader, delay time.Duration, friends ...*Friend) error + func (s *Self) SendVideoToGroup(group *Group, file io.Reader) (*SentMessage, error) + func (s *Self) SendVideoToGroups(video io.Reader, delay time.Duration, groups ...*Group) error + func (s *Self) SendVideoToMp(mp *Mp, file io.Reader) (*SentMessage, error) + func (s *Self) SetRemarkNameToFriend(friend *Friend, remarkName string) error + func (s *Self) UpdateMembersDetail() error + type SendMessage struct + ClientMsgId string + Content string + FromUserName string + LocalID string + MediaId string + ToUserName string + Type MessageType + func NewMediaSendMessage(msgType MessageType, fromUserName, toUserName, mediaId string) *SendMessage + func NewSendMessage(msgType MessageType, content, fromUserName, toUserName, mediaId string) *SendMessage + func NewTextSendMessage(content, fromUserName, toUserName string) *SendMessage + type SentMessage struct + MsgId string + func (s *SentMessage) CanRevoke() bool + func (s *SentMessage) ForwardToFriends(friends ...*Friend) error + func (s *SentMessage) ForwardToFriendsWithDelay(delay time.Duration, friends ...*Friend) error + func (s *SentMessage) ForwardToGroups(groups ...*Group) error + func (s *SentMessage) ForwardToGroupsWithDelay(delay time.Duration, groups ...*Group) error + func (s *SentMessage) Revoke() error + type Serializer interface + Decode func(reader io.Reader, v interface{}) error + Encode func(writer io.Writer, v interface{}) error + type Session struct + LoginInfo *LoginInfo + Request *BaseRequest + Response *WebInitResponse + type SyncCheckResponse struct + RetCode string + Selector Selector + func NewSyncCheckResponse(b []byte) (*SyncCheckResponse, error) + func (s SyncCheckResponse) Err() error + func (s SyncCheckResponse) HasNewMessage() bool + func (s SyncCheckResponse) NorMal() bool + func (s SyncCheckResponse) Success() bool + type SyncKey struct + Count int + List []struct{ ... } + type UploadResponse struct + BaseResponse BaseResponse + MediaId string + type User struct + Alias string + AppAccountFlag int + AttrStatus int64 + ChatRoomId int + City string + ContactFlag int + DisplayName string + EncryChatRoomId string + HeadImgFlag int + HeadImgUrl string + HideInputBarFlag int + IsOwner int + KeyWord string + MemberCount int + MemberList Members + NickName string + OwnerUin int + PYInitial string + PYQuanPin string + Province string + RemarkName string + RemarkPYInitial string + RemarkPYQuanPin string + Sex int + Signature string + SnsFlag int + StarFriend int + Statues int + Uin int64 + UniFriend int + UserName string + VerifyFlag int + WebWxPluginSwitch int + func (u *User) AsFriend() (*Friend, bool) + func (u *User) AsGroup() (*Group, bool) + func (u *User) AsMP() (*Mp, bool) + func (u *User) Detail() error + func (u *User) Equal(user *User) bool + func (u *User) GetAvatarResponse() (resp *http.Response, err error) + func (u *User) ID() string + func (u *User) IsFriend() bool + func (u *User) IsGroup() bool + func (u *User) IsMP() bool + func (u *User) IsPin() bool + func (u *User) IsSelf() bool + func (u *User) OrderSymbol() string + func (u *User) Pin() error + func (u *User) SaveAvatar(filename string) error + func (u *User) SaveAvatarWithWriter(writer io.Writer) error + func (u *User) Self() *Self + func (u *User) String() string + func (u *User) UnPin() error + type UserAgentHook struct + UserAgent string + func (u UserAgentHook) AfterRequest(_ *http.Response, _ error) + func (u UserAgentHook) BeforeRequest(req *http.Request) + type UserDetailItem struct + EncryChatRoomId string + UserName string + type UserDetailItemList []UserDetailItem + func NewUserDetailItemList(members Members) UserDetailItemList + type WebInitResponse struct + BaseResponse BaseResponse + ChatSet string + ClickReportInterval int + ClientVersion int + ContactList Members + Count int + GrayScale int + InviteStartCount int + MPSubscribeMsgCount int + MPSubscribeMsgList []*MPSubscribeMsg + SKey string + SyncKey *SyncKey + SystemTime int64 + User *User + type WebWxBatchContactResponse struct + BaseResponse BaseResponse + ContactList []*User + Count int + type WebWxContactResponse struct + BaseResponse BaseResponse + MemberCount int + MemberList []*User + Seq int64 + type WebWxSyncResponse struct + AddMsgCount int + AddMsgList []*Message + BaseResponse BaseResponse + ContinueFlag int + DelContactCount int + ModChatRoomMemberCount int + ModChatRoomMemberList Members + ModContactCount int + Skey string + SyncCheckKey SyncKey + SyncKey *SyncKey + type WechatDomain string + func (w WechatDomain) BaseHost() string + func (w WechatDomain) FileHost() string + func (w WechatDomain) SyncHost() string