Documentation ¶
Overview ¶
企点协议相关特殊逻辑
Index ¶
- Constants
- Variables
- func GenIMEI() string
- func GenRandomDevice()
- func NewUinFilterPrivate(uin int64) func(*message.PrivateMessage) bool
- type AtAllRemainInfo
- type ChannelInfo
- type ClientDisconnectedEvent
- type ClientProtocol
- type ConnectionQualityInfo
- type Coordinate
- type CurrentTalkative
- type CustomFace
- type DeviceInfo
- type DeviceInfoFile
- type FriendInfo
- type FriendListResponse
- type FriendMessageRecalledEvent
- type FriendPokeNotifyEvent
- type GroupDigest
- type GroupDigestEvent
- type GroupFile
- type GroupFileSystem
- func (fs *GroupFileSystem) CreateFolder(parentFolder, name string) error
- func (fs *GroupFileSystem) DeleteFile(parentFolderID, fileId string, busId int32) string
- func (fs *GroupFileSystem) DeleteFolder(folderId string) error
- func (fs *GroupFileSystem) GetDownloadUrl(file *GroupFile) string
- func (fs *GroupFileSystem) GetFilesByFolder(folderID string) ([]*GroupFile, []*GroupFolder, error)
- func (fs *GroupFileSystem) RenameFolder(folderId, newName string) error
- func (fs *GroupFileSystem) Root() ([]*GroupFile, []*GroupFolder, error)
- func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error
- type GroupFolder
- type GroupHonorInfo
- type GroupInfo
- func (g *GroupInfo) AdministratorOrOwner() bool
- func (g *GroupInfo) FindMember(uin int64) *GroupMemberInfo
- func (g *GroupInfo) FindMemberWithoutLock(uin int64) *GroupMemberInfo
- func (g *GroupInfo) MuteAll(mute bool)
- func (g *GroupInfo) MuteAnonymous(id, nick string, seconds int32) error
- func (g *GroupInfo) Quit()
- func (g *GroupInfo) Read(f func(*GroupInfo) interface{}) interface{}
- func (g *GroupInfo) SelfPermission() MemberPermission
- func (g *GroupInfo) Update(f func(*GroupInfo))
- func (g *GroupInfo) UpdateGroupHeadPortrait(img []byte)
- func (g *GroupInfo) UpdateMemo(newMemo string)
- func (g *GroupInfo) UpdateName(newName string)
- type GroupInvitedRequest
- type GroupLeaveEvent
- type GroupMemberInfo
- func (m *GroupMemberInfo) CardChangable() bool
- func (m *GroupMemberInfo) DisplayName() string
- func (m *GroupMemberInfo) EditCard(card string)
- func (m *GroupMemberInfo) EditSpecialTitle(title string)
- func (m *GroupMemberInfo) Kick(msg string, block bool) error
- func (m *GroupMemberInfo) Manageable() bool
- func (m *GroupMemberInfo) Mute(time uint32) error
- func (m *GroupMemberInfo) Poke()
- func (m *GroupMemberInfo) SetAdmin(flag bool)
- type GroupMessageRecalledEvent
- type GroupMuteEvent
- type GroupNameUpdatedEvent
- type GroupPokeNotifyEvent
- type GroupRedBagLuckyKingNotifyEvent
- type GroupSearchInfo
- type GroupSessionInfo
- type GroupSystemMessages
- type GuildInfo
- type GuildMemberInfo
- type GuildMeta
- type GuildService
- func (s *GuildService) FetchGuestGuild(guildId uint64) (*GuildMeta, error)
- func (s *GuildService) GetGuildMemberProfileInfo(guildId, tinyId uint64) (*GuildUserProfile, error)
- func (s *GuildService) GetGuildMembers(guildId uint64) (bots []*GuildMemberInfo, members []*GuildMemberInfo, admins []*GuildMemberInfo, ...)
- func (s *GuildService) GetUserProfile(tinyId uint64) (*GuildUserProfile, error)
- type GuildUserProfile
- type HandlerMap
- func (m *HandlerMap) Delete(key uint16)
- func (m *HandlerMap) Load(key uint16) (value *handlerInfo, ok bool)
- func (m *HandlerMap) LoadAndDelete(key uint16) (value *handlerInfo, loaded bool)
- func (m *HandlerMap) LoadOrStore(key uint16, value *handlerInfo) (actual *handlerInfo, loaded bool)
- func (m *HandlerMap) Range(f func(key uint16, value *handlerInfo) bool)
- func (m *HandlerMap) Store(key uint16, value *handlerInfo)
- type HonorMemberInfo
- type HonorType
- type INotifyEvent
- type LogEvent
- type LoginError
- type LoginResponse
- type Loginsiginfo
- type MemberCardUpdatedEvent
- type MemberHonorChangedNotifyEvent
- type MemberJoinGroupEvent
- type MemberLeaveGroupEvent
- type MemberPermission
- type MemberPermissionChangedEvent
- type MemberSpecialTitleUpdatedEvent
- type ModelGet
- type ModelReq
- type ModelReqData
- type ModelSet
- type ModelVariant
- type NewFriendEvent
- type NewFriendRequest
- type OcrResponse
- type OfflineFileEvent
- type OtherClientInfo
- type OtherClientStatusChangedEvent
- type QQClient
- func (c *QQClient) AddGroupNoticeSimple(groupCode int64, text string) error
- func (c *QQClient) AddGroupNoticeWithPic(groupCode int64, text string, pic []byte) error
- func (c *QQClient) CheckUrlSafely(url string) UrlSecurityLevel
- func (c *QQClient) ConnectionQualityTest() *ConnectionQualityInfo
- func (c *QQClient) Debug(msg string, args ...interface{})
- func (c *QQClient) DeleteEssenceMessage(groupCode int64, msgID, msgInternalId int32) error
- func (c *QQClient) DeleteFriend(uin int64) error
- func (c *QQClient) DeleteUnidirectionalFriend(uin int64) error
- func (c *QQClient) Disconnect()
- func (c *QQClient) DownloadForwardMessage(resId string) *message.ForwardElement
- func (c *QQClient) Error(msg string, args ...interface{})
- func (c *QQClient) FetchQRCode() (*QRCodeLoginResponse, error)
- func (c *QQClient) FindFriend(uin int64) *FriendInfo
- func (c *QQClient) FindGroup(code int64) *GroupInfo
- func (c *QQClient) FindGroupByUin(uin int64) *GroupInfo
- func (c *QQClient) GenToken() []byte
- func (c *QQClient) GetAllowedClients() ([]*OtherClientInfo, error)
- func (c *QQClient) GetAtAllRemain(groupCode int64) (*AtAllRemainInfo, error)
- func (c *QQClient) GetCustomFaces() ([]*CustomFace, error)
- func (c *QQClient) GetForwardMessage(resID string) *message.ForwardMessage
- func (c *QQClient) GetFriendList() (*FriendListResponse, error)
- func (c *QQClient) GetGroupEssenceMsgList(groupCode int64) ([]GroupDigest, error)
- func (c *QQClient) GetGroupFileSystem(groupCode int64) (fs *GroupFileSystem, err error)
- func (c *QQClient) GetGroupFileUrl(groupCode int64, fileId string, busId int32) string
- func (c *QQClient) GetGroupHonorInfo(groupCode int64, honorType HonorType) (*GroupHonorInfo, error)
- func (c *QQClient) GetGroupImageDownloadUrl(fileId, groupCode int64, fileMd5 []byte) (string, error)
- func (c *QQClient) GetGroupInfo(groupCode int64) (*GroupInfo, error)
- func (c *QQClient) GetGroupList() ([]*GroupInfo, error)
- func (c *QQClient) GetGroupMembers(group *GroupInfo) ([]*GroupMemberInfo, error)
- func (c *QQClient) GetGroupMessages(groupCode, beginSeq, endSeq int64) ([]*message.GroupMessage, error)
- func (c *QQClient) GetGroupSystemMessages() (*GroupSystemMessages, error)
- func (c *QQClient) GetMemberInfo(groupCode, memberUin int64) (*GroupMemberInfo, error)
- func (c *QQClient) GetModelShow(modelName string) ([]*ModelVariant, error)
- func (c *QQClient) GetShortVideoUrl(uuid, md5 []byte) string
- func (c *QQClient) GetStatistics() *Statistics
- func (c *QQClient) GetSummaryInfo(target int64) (*SummaryCardInfo, error)
- func (c *QQClient) GetTts(text string) ([]byte, error)
- func (c *QQClient) GetUnidirectionalFriendList() (ret []*UnidirectionalFriendInfo, err error)
- func (c *QQClient) GetVipInfo(target int64) (*VipInfo, error)
- func (c *QQClient) GetWordSegmentation(text string) ([]string, error)
- func (c *QQClient) Getprivatecookie() string
- func (c *QQClient) ImageOcr(img interface{}) (*OcrResponse, error)
- func (c *QQClient) Info(msg string, args ...interface{})
- func (c *QQClient) Login() (*LoginResponse, error)
- func (c *QQClient) MarkGroupMessageReaded(groupCode, seq int64)
- func (c *QQClient) MarkPrivateMessageReaded(uin, time int64)
- func (c *QQClient) OnDisconnected(f func(*QQClient, *ClientDisconnectedEvent))
- func (c *QQClient) OnFriendMessageRecalled(f func(*QQClient, *FriendMessageRecalledEvent))
- func (c *QQClient) OnFriendNotify(f func(*QQClient, INotifyEvent))
- func (c *QQClient) OnGroupDigest(f func(*QQClient, *GroupDigestEvent))
- func (c *QQClient) OnGroupInvited(f func(*QQClient, *GroupInvitedRequest))
- func (c *QQClient) OnGroupMemberCardUpdated(f func(*QQClient, *MemberCardUpdatedEvent))
- func (c *QQClient) OnGroupMemberJoined(f func(*QQClient, *MemberJoinGroupEvent))
- func (c *QQClient) OnGroupMemberLeaved(f func(*QQClient, *MemberLeaveGroupEvent))
- func (c *QQClient) OnGroupMemberPermissionChanged(f func(*QQClient, *MemberPermissionChangedEvent))
- func (c *QQClient) OnGroupMessage(f func(*QQClient, *message.GroupMessage))
- func (c *QQClient) OnGroupMessageRecalled(f func(*QQClient, *GroupMessageRecalledEvent))
- func (c *QQClient) OnGroupMuted(f func(*QQClient, *GroupMuteEvent))
- func (c *QQClient) OnGroupNameUpdated(f func(*QQClient, *GroupNameUpdatedEvent))
- func (c *QQClient) OnGroupNotify(f func(*QQClient, INotifyEvent))
- func (c *QQClient) OnJoinGroup(f func(*QQClient, *GroupInfo))
- func (c *QQClient) OnLeaveGroup(f func(*QQClient, *GroupLeaveEvent))
- func (c *QQClient) OnLog(f func(*QQClient, *LogEvent))
- func (c *QQClient) OnMemberSpecialTitleUpdated(f func(*QQClient, *MemberSpecialTitleUpdatedEvent))
- func (c *QQClient) OnNewFriendAdded(f func(*QQClient, *NewFriendEvent))
- func (c *QQClient) OnNewFriendRequest(f func(*QQClient, *NewFriendRequest))
- func (c *QQClient) OnOtherClientStatusChanged(f func(*QQClient, *OtherClientStatusChangedEvent))
- func (c *QQClient) OnPrivateMessage(f func(*QQClient, *message.PrivateMessage))
- func (c *QQClient) OnPrivateMessageF(filter func(*message.PrivateMessage) bool, ...)
- func (c *QQClient) OnReceivedOfflineFile(f func(*QQClient, *OfflineFileEvent))
- func (c *QQClient) OnSelfGroupMessage(f func(*QQClient, *message.GroupMessage))
- func (c *QQClient) OnSelfPrivateMessage(f func(*QQClient, *message.PrivateMessage))
- func (c *QQClient) OnServerUpdated(f func(*QQClient, *ServerUpdatedEvent) bool)
- func (c *QQClient) OnTempMessage(f func(*QQClient, *TempMessageEvent))
- func (c *QQClient) OnUserWantJoinGroup(f func(*QQClient, *UserJoinGroupRequest))
- func (c *QQClient) QRCodeLogin(info *QRCodeLoginInfo) (*LoginResponse, error)
- func (c *QQClient) QueryFriendImage(target int64, hash []byte, size int32) (*message.FriendImageElement, error)
- func (c *QQClient) QueryGroupImage(groupCode int64, hash []byte, size int32) (*message.GroupImageElement, error)
- func (c *QQClient) QueryQRCodeStatus(sig []byte) (*QRCodeLoginResponse, error)
- func (c *QQClient) RecallGroupMessage(groupCode int64, msgID, msgInternalId int32) error
- func (c *QQClient) RecallPrivateMessage(uin, ts int64, msgID, msgInternalId int32) error
- func (c *QQClient) RefreshStatus() error
- func (c *QQClient) Release()
- func (c *QQClient) ReloadFriendList() error
- func (c *QQClient) ReloadGroupList() error
- func (c *QQClient) RequestSMS() bool
- func (c *QQClient) SearchGroupByKeyword(keyword string) ([]GroupSearchInfo, error)
- func (c *QQClient) SendFriendMusicShare(target int64, msg *message.MusicShareElement)
- func (c *QQClient) SendFriendPoke(target int64)
- func (c *QQClient) SendGroupForwardMessage(groupCode int64, m *message.ForwardElement) *message.GroupMessage
- func (c *QQClient) SendGroupGift(groupCode, uin uint64, gift message.GroupGift)
- func (c *QQClient) SendGroupMessage(groupCode int64, m *message.SendingMessage, f ...bool) *message.GroupMessage
- func (c *QQClient) SendGroupMusicShare(target int64, msg *message.MusicShareElement) (*message.GroupMessage, error)
- func (c *QQClient) SendGroupPoke(groupCode, target int64)
- func (c *QQClient) SendGroupTempMessage(groupCode, target int64, m *message.SendingMessage) *message.TempMessage
- func (c *QQClient) SendPrivateMessage(target int64, m *message.SendingMessage) *message.PrivateMessage
- func (c *QQClient) SetCustomServer(servers []*net.TCPAddr)
- func (c *QQClient) SetEssenceMessage(groupCode int64, msgID, msgInternalId int32) error
- func (c *QQClient) SetModelShow(modelName string, modelShow string) error
- func (c *QQClient) SetOnlineStatus(s UserOnlineStatus)
- func (c *QQClient) SolveFriendRequest(req *NewFriendRequest, accept bool)
- func (c *QQClient) SolveGroupJoinRequest(i interface{}, accept, block bool, reason string)
- func (c *QQClient) SubmitCaptcha(result string, sign []byte) (*LoginResponse, error)
- func (c *QQClient) SubmitSMS(code string) (*LoginResponse, error)
- func (c *QQClient) SubmitTicket(ticket string) (*LoginResponse, error)
- func (c *QQClient) SyncSessions() (*SessionSyncResponse, error)
- func (c *QQClient) TokenLogin(token []byte) error
- func (c *QQClient) Trace(msg string, args ...interface{})
- func (c *QQClient) Translate(src, dst, text string) (string, error)
- func (c *QQClient) UploadGroupForwardMessage(groupCode int64, m *message.ForwardMessage) *message.ForwardElement
- func (c *QQClient) UploadGroupImage(groupCode int64, img io.ReadSeeker) (*message.GroupImageElement, error)
- func (c *QQClient) UploadGroupImageByFile(groupCode int64, path string) (*message.GroupImageElement, error)
- func (c *QQClient) UploadGroupPtt(groupCode int64, voice io.ReadSeeker) (*message.GroupVoiceElement, error)
- func (c *QQClient) UploadGroupShortVideo(groupCode int64, video, thumb io.ReadSeeker, combinedCache ...string) (*message.ShortVideoElement, error)
- func (c *QQClient) UploadPrivateImage(target int64, img io.ReadSeeker) (*message.FriendImageElement, error)
- func (c *QQClient) UploadPrivatePtt(target int64, voice io.ReadSeeker) (*message.PrivateVoiceElement, error)
- func (c *QQClient) UseDevice(info *DeviceInfo)
- func (c *QQClient) Warning(msg string, args ...interface{})
- type QRCodeLoginInfo
- type QRCodeLoginResponse
- type QRCodeLoginState
- type QiDianAccountInfo
- type ServerUpdatedEvent
- type SessionSyncResponse
- type Statistics
- type SummaryCardInfo
- type TempMessageEvent
- type TempSessionInfo
- type TempSessionSource
- type TextDetection
- type UnidirectionalFriendInfo
- type UrlSecurityLevel
- type UserJoinGroupRequest
- type UserOnlineStatus
- type Version
- type VersionFile
- type VipInfo
Constants ¶
const ( NeedCaptcha LoginError = 1 OtherLoginError LoginError = 3 UnsafeDeviceError LoginError = 4 SMSNeededError LoginError = 5 TooManySMSRequestError LoginError = 6 SMSOrVerifyNeededError LoginError = 7 SliderNeededError LoginError = 8 UnknownLoginError LoginError = -1 QRCodeImageFetch QRCodeLoginState = 1 QRCodeWaitingForScan QRCodeLoginState = 2 QRCodeWaitingForConfirm QRCodeLoginState = 3 QRCodeTimeout QRCodeLoginState = 4 QRCodeConfirmed QRCodeLoginState = 5 QRCodeCanceled QRCodeLoginState = 6 StatusOnline UserOnlineStatus = 11 // 在线 StatusOffline UserOnlineStatus = 21 // 离线 StatusAway UserOnlineStatus = 31 // 离开 StatusInvisible UserOnlineStatus = 41 // 隐身 StatusBusy UserOnlineStatus = 50 // 忙 StatusBattery UserOnlineStatus = 1000 // 当前电量 StatusListening UserOnlineStatus = 1028 // 听歌中 StatusConstellation UserOnlineStatus = 1040 // 星座运势 StatusWeather UserOnlineStatus = 1030 // 今日天气 StatusMeetSpring UserOnlineStatus = 1069 // 遇见春天 StatusTimi UserOnlineStatus = 1027 // Timi中 StatusEatChicken UserOnlineStatus = 1064 // 吃鸡中 StatusLoving UserOnlineStatus = 1051 // 恋爱中 StatusWangWang UserOnlineStatus = 1053 // 汪汪汪 StatusCookedRice UserOnlineStatus = 1019 // 干饭中 StatusStudy UserOnlineStatus = 1018 // 学习中 StatusStayUp UserOnlineStatus = 1032 // 熬夜中 StatusPlayBall UserOnlineStatus = 1050 // 打球中 StatusSignal UserOnlineStatus = 1011 // 信号弱 StatusStudyOnline UserOnlineStatus = 1024 // 在线学习 StatusGaming UserOnlineStatus = 1017 // 游戏中 StatusVacationing UserOnlineStatus = 1022 // 度假中 StatusWatchingTV UserOnlineStatus = 1021 // 追剧中 StatusFitness UserOnlineStatus = 1020 // 健身中 Owner MemberPermission = 1 Administrator MemberPermission = 2 Member MemberPermission = 3 AndroidPhone ClientProtocol = 1 IPad ClientProtocol = 2 AndroidWatch ClientProtocol = 3 MacOS ClientProtocol = 4 QiDian ClientProtocol = 5 )
const (
UnknownDecoder = iota
)
Variables ¶
var ( ErrAlreadyOnline = errors.New("already online") ErrMemberNotFound = errors.New("member not found") ErrNotExists = errors.New("not exists") )
var ( EmptyBytes = []byte{} NumberRange = "0123456789" )
var SystemDeviceInfo = &DeviceInfo{ Display: []byte("MIRAI.123456.001"), Product: []byte("mirai"), Device: []byte("mirai"), Board: []byte("mirai"), Brand: []byte("mamoe"), Model: []byte("mirai"), Bootloader: []byte("unknown"), FingerPrint: []byte("mamoe/mirai/mirai:10/MIRAI.200122.001/1234567:user/release-keys"), BootId: []byte("cb886ae2-00b6-4d68-a230-787f111d12c7"), ProcVersion: []byte("Linux version 3.0.31-cb886ae2 (android-build@xxx.xxx.xxx.xxx.com)"), BaseBand: []byte{}, SimInfo: []byte("T-Mobile"), OSType: []byte("android"), MacAddress: []byte("00:50:56:C0:00:08"), IpAddress: []byte{10, 0, 1, 3}, WifiBSSID: []byte("00:50:56:C0:00:08"), WifiSSID: []byte("<unknown ssid>"), IMEI: "468356291846738", AndroidId: []byte("MIRAI.123456.001"), APN: []byte("wifi"), VendorName: []byte("MIUI"), VendorOSName: []byte("mirai"), Protocol: IPad, Version: &Version{ Incremental: []byte("5891938"), Release: []byte("10"), CodeName: []byte("REL"), Sdk: 29, }, }
Functions ¶
func GenRandomDevice ¶
func GenRandomDevice()
func NewUinFilterPrivate ¶
func NewUinFilterPrivate(uin int64) func(*message.PrivateMessage) bool
Types ¶
type AtAllRemainInfo ¶
type ChannelInfo ¶
type ChannelInfo struct { ChannelId uint64 ChannelName string Time uint64 EventTime uint32 NotifyType uint32 ChannelType uint32 AtAllSeq uint64 }
ChannelInfo 子频道信息
type ClientDisconnectedEvent ¶
type ClientDisconnectedEvent struct {
Message string
}
type ClientProtocol ¶
type ClientProtocol int
type ConnectionQualityInfo ¶
type ConnectionQualityInfo struct { // ChatServerLatency 聊天服务器延迟 ChatServerLatency int64 // ChatServerPacketLoss 聊天服务器ICMP丢包数 ChatServerPacketLoss int // LongMessageServerLatency 长消息服务器延迟. 涉及长消息以及合并转发消息下载 LongMessageServerLatency int64 // LongMessageServerResponseLatency 长消息服务器返回延迟 LongMessageServerResponseLatency int64 // SrvServerLatency Highway服务器延迟. 涉及媒体以及群文件上传 SrvServerLatency int64 // SrvServerPacketLoss Highway服务器ICMP丢包数. SrvServerPacketLoss int }
ConnectionQualityInfo 客户端连接质量测试结果 延迟单位为 ms 如为 9999 则测试失败 测试方法为 TCP 连接测试 丢包测试方法为 ICMP. 总共发送 10 个包, 记录丢包数
type Coordinate ¶
type CurrentTalkative ¶
type CustomFace ¶
type DeviceInfo ¶
type DeviceInfo struct { Display []byte Product []byte Device []byte Board []byte Brand []byte Model []byte Bootloader []byte FingerPrint []byte BootId []byte ProcVersion []byte BaseBand []byte SimInfo []byte OSType []byte MacAddress []byte IpAddress []byte WifiBSSID []byte WifiSSID []byte IMSIMd5 []byte IMEI string AndroidId []byte APN []byte VendorName []byte VendorOSName []byte Guid []byte TgtgtKey []byte Protocol ClientProtocol Version *Version }
func (*DeviceInfo) GenDeviceInfoData ¶
func (info *DeviceInfo) GenDeviceInfoData() []byte
func (*DeviceInfo) GenNewGuid ¶
func (info *DeviceInfo) GenNewGuid()
func (*DeviceInfo) GenNewTgtgtKey ¶
func (info *DeviceInfo) GenNewTgtgtKey()
func (*DeviceInfo) ReadJson ¶
func (info *DeviceInfo) ReadJson(d []byte) error
func (*DeviceInfo) ToJson ¶
func (info *DeviceInfo) ToJson() []byte
type DeviceInfoFile ¶
type DeviceInfoFile struct { Display string `json:"display"` Product string `json:"product"` Device string `json:"device"` Board string `json:"board"` Model string `json:"model"` FingerPrint string `json:"finger_print"` BootId string `json:"boot_id"` ProcVersion string `json:"proc_version"` Protocol int `json:"protocol"` // 0: Pad 1: Phone 2: Watch IMEI string `json:"imei"` Brand string `json:"brand"` Bootloader string `json:"bootloader"` BaseBand string `json:"base_band"` Version *VersionFile `json:"version"` SimInfo string `json:"sim_info"` OsType string `json:"os_type"` MacAddress string `json:"mac_address"` IpAddress []int32 `json:"ip_address"` WifiBSSID string `json:"wifi_bssid"` WifiSSID string `json:"wifi_ssid"` ImsiMd5 string `json:"imsi_md5"` AndroidId string `json:"android_id"` Apn string `json:"apn"` VendorName string `json:"vendor_name"` VendorOSName string `json:"vendor_os_name"` }
type FriendListResponse ¶
type FriendListResponse struct { TotalCount int32 List []*FriendInfo }
type FriendPokeNotifyEvent ¶
FriendPokeNotifyEvent 好友戳一戳提示事件
func (*FriendPokeNotifyEvent) Content ¶
func (e *FriendPokeNotifyEvent) Content() string
func (*FriendPokeNotifyEvent) From ¶
func (e *FriendPokeNotifyEvent) From() int64
type GroupDigest ¶
type GroupDigest struct { GroupCode int64 `json:"group_code,string"` MessageID uint32 `json:"msg_seq"` InternalMessageID uint32 `json:"msg_random"` SenderUin int64 `json:"sender_uin,string"` SenderNick string `json:"sender_nick"` SenderTime int64 `json:"sender_time"` AddDigestUin int64 `json:"add_digest_uin,string"` AddDigestNick string `json:"add_digest_nick"` AddDigestTime int64 `json:"add_digest_time"` }
GroupDigest 群精华消息
type GroupDigestEvent ¶
type GroupDigestEvent struct { GroupCode int64 MessageID int32 InternalMessageID int32 OperationType int32 // 1 -> 设置精华消息, 2 -> 移除精华消息 OperateTime uint32 SenderUin int64 OperatorUin int64 SenderNick string OperatorNick string }
GroupDigestEvent 群精华消息 不知道tx为什么搞两种名字
type GroupFile ¶
type GroupFile struct { GroupCode int64 `json:"group_id"` FileId string `json:"file_id"` FileName string `json:"file_name"` BusId int32 `json:"busid"` FileSize int64 `json:"file_size"` UploadTime int64 `json:"upload_time"` DeadTime int64 `json:"dead_time"` ModifyTime int64 `json:"modify_time"` DownloadTimes int64 `json:"download_times"` Uploader int64 `json:"uploader"` UploaderName string `json:"uploader_name"` }
type GroupFileSystem ¶
type GroupFileSystem struct { FileCount uint32 `json:"file_count"` LimitCount uint32 `json:"limit_count"` UsedSpace uint64 `json:"used_space"` TotalSpace uint64 `json:"total_space"` GroupCode int64 `json:"group_id"` // contains filtered or unexported fields }
func (*GroupFileSystem) CreateFolder ¶
func (fs *GroupFileSystem) CreateFolder(parentFolder, name string) error
func (*GroupFileSystem) DeleteFile ¶
func (fs *GroupFileSystem) DeleteFile(parentFolderID, fileId string, busId int32) string
DeleteFile 删除群文件,需要管理权限. 返回错误, 空为删除成功
func (*GroupFileSystem) DeleteFolder ¶
func (fs *GroupFileSystem) DeleteFolder(folderId string) error
func (*GroupFileSystem) GetDownloadUrl ¶
func (fs *GroupFileSystem) GetDownloadUrl(file *GroupFile) string
func (*GroupFileSystem) GetFilesByFolder ¶
func (fs *GroupFileSystem) GetFilesByFolder(folderID string) ([]*GroupFile, []*GroupFolder, error)
func (*GroupFileSystem) RenameFolder ¶
func (fs *GroupFileSystem) RenameFolder(folderId, newName string) error
func (*GroupFileSystem) Root ¶
func (fs *GroupFileSystem) Root() ([]*GroupFile, []*GroupFolder, error)
func (*GroupFileSystem) UploadFile ¶
func (fs *GroupFileSystem) UploadFile(p, name, folderId string) error
type GroupFolder ¶
type GroupHonorInfo ¶
type GroupHonorInfo struct { GroupCode string `json:"gc"` Uin string `json:"uin"` Type HonorType `json:"type"` TalkativeList []HonorMemberInfo `json:"talkativeList"` CurrentTalkative CurrentTalkative `json:"currentTalkative"` ActorList []HonorMemberInfo `json:"actorList"` LegendList []HonorMemberInfo `json:"legendList"` StrongNewbieList []HonorMemberInfo `json:"strongnewbieList"` EmotionList []HonorMemberInfo `json:"emotionList"` }
type GroupInfo ¶
type GroupInfo struct { Uin int64 Code int64 Name string Memo string OwnerUin int64 GroupCreateTime uint32 GroupLevel uint32 MemberCount uint16 MaxMemberCount uint16 Members []*GroupMemberInfo // 最后一条信息的SEQ,只有通过 GetGroupInfo 函数获取的 GroupInfo 才会有 LastMsgSeq int64 // contains filtered or unexported fields }
func (*GroupInfo) AdministratorOrOwner ¶
func (*GroupInfo) FindMember ¶
func (g *GroupInfo) FindMember(uin int64) *GroupMemberInfo
func (*GroupInfo) FindMemberWithoutLock ¶
func (g *GroupInfo) FindMemberWithoutLock(uin int64) *GroupMemberInfo
func (*GroupInfo) MuteAnonymous ¶
func (*GroupInfo) SelfPermission ¶
func (g *GroupInfo) SelfPermission() MemberPermission
func (*GroupInfo) UpdateGroupHeadPortrait ¶
func (*GroupInfo) UpdateMemo ¶
func (*GroupInfo) UpdateName ¶
type GroupInvitedRequest ¶
type GroupInvitedRequest struct { RequestId int64 `json:"request_id"` InvitorUin int64 `json:"invitor_uin"` InvitorNick string `json:"invitor_nick"` GroupCode int64 `json:"group_id"` GroupName string `json:"group_name"` Checked bool `json:"checked"` Actor int64 `json:"actor"` // contains filtered or unexported fields }
func (*GroupInvitedRequest) Accept ¶
func (r *GroupInvitedRequest) Accept()
func (*GroupInvitedRequest) Reject ¶
func (r *GroupInvitedRequest) Reject(block bool, reason string)
type GroupLeaveEvent ¶
type GroupLeaveEvent struct { Group *GroupInfo Operator *GroupMemberInfo }
type GroupMemberInfo ¶
type GroupMemberInfo struct { Group *GroupInfo Uin int64 Gender byte Nickname string CardName string Level uint16 JoinTime int64 LastSpeakTime int64 SpecialTitle string SpecialTitleExpireTime int64 ShutUpTimestamp int64 Permission MemberPermission }
func (*GroupMemberInfo) CardChangable ¶
func (m *GroupMemberInfo) CardChangable() bool
func (*GroupMemberInfo) DisplayName ¶
func (m *GroupMemberInfo) DisplayName() string
func (*GroupMemberInfo) EditCard ¶
func (m *GroupMemberInfo) EditCard(card string)
func (*GroupMemberInfo) EditSpecialTitle ¶
func (m *GroupMemberInfo) EditSpecialTitle(title string)
func (*GroupMemberInfo) Manageable ¶
func (m *GroupMemberInfo) Manageable() bool
func (*GroupMemberInfo) Mute ¶
func (m *GroupMemberInfo) Mute(time uint32) error
func (*GroupMemberInfo) Poke ¶
func (m *GroupMemberInfo) Poke()
func (*GroupMemberInfo) SetAdmin ¶
func (m *GroupMemberInfo) SetAdmin(flag bool)
type GroupMuteEvent ¶
type GroupNameUpdatedEvent ¶
type GroupPokeNotifyEvent ¶
GroupPokeNotifyEvent 群内戳一戳提示事件
func (*GroupPokeNotifyEvent) Content ¶
func (e *GroupPokeNotifyEvent) Content() string
func (*GroupPokeNotifyEvent) From ¶
func (e *GroupPokeNotifyEvent) From() int64
type GroupRedBagLuckyKingNotifyEvent ¶
GroupRedBagLuckyKingNotifyEvent 群内抢红包运气王提示事件
func (*GroupRedBagLuckyKingNotifyEvent) Content ¶
func (e *GroupRedBagLuckyKingNotifyEvent) Content() string
func (*GroupRedBagLuckyKingNotifyEvent) From ¶
func (e *GroupRedBagLuckyKingNotifyEvent) From() int64
type GroupSearchInfo ¶
GroupSearchInfo 通过搜索得到的群信息
type GroupSessionInfo ¶
type GroupSessionInfo struct { GroupCode int64 UnreadCount uint32 LatestMessages []*message.GroupMessage }
GroupSessionInfo 群会话信息
type GroupSystemMessages ¶
type GroupSystemMessages struct { InvitedRequests []*GroupInvitedRequest `json:"invited_requests"` JoinRequests []*UserJoinGroupRequest `json:"join_requests"` }
type GuildInfo ¶
type GuildInfo struct { GuildId uint64 GuildCode uint64 GuildName string CoverUrl string AvatarUrl string Channels []*ChannelInfo Bots []*GuildMemberInfo Members []*GuildMemberInfo Admins []*GuildMemberInfo }
GuildInfo 频道信息
type GuildMemberInfo ¶
type GuildMeta ¶
type GuildMeta struct { GuildId uint64 GuildName string GuildProfile string MaxMemberCount int64 MemberCount int64 CreateTime int64 MaxRobotCount int32 MaxAdminCount int32 OwnerId uint64 }
GuildMeta 频道数据
type GuildService ¶
type GuildService struct { TinyId uint64 Nickname string AvatarUrl string GuildCount uint32 // Guilds 由服务器推送的频道列表 Guilds []*GuildInfo // contains filtered or unexported fields }
GuildService 频道模块内自身的信息
func (*GuildService) FetchGuestGuild ¶
func (s *GuildService) FetchGuestGuild(guildId uint64) (*GuildMeta, error)
func (*GuildService) GetGuildMemberProfileInfo ¶
func (s *GuildService) GetGuildMemberProfileInfo(guildId, tinyId uint64) (*GuildUserProfile, error)
func (*GuildService) GetGuildMembers ¶
func (s *GuildService) GetGuildMembers(guildId uint64) (bots []*GuildMemberInfo, members []*GuildMemberInfo, admins []*GuildMemberInfo, err error)
func (*GuildService) GetUserProfile ¶
func (s *GuildService) GetUserProfile(tinyId uint64) (*GuildUserProfile, error)
type GuildUserProfile ¶
type GuildUserProfile struct { TinyId uint64 Nickname string AvatarUrl string JoinTime int64 // 只有 GetGuildMemberProfileInfo 函数才会有 }
GuildUserProfile 频道系统用户资料
type HandlerMap ¶
type HandlerMap struct {
// contains filtered or unexported fields
}
Map is like a Go map[interface{}]interface{} but is safe for concurrent use by multiple goroutines without additional locking or coordination. Loads, stores, and deletes run in amortized constant time.
The Map type is specialized. Most code should use a plain Go map instead, with separate locking or coordination, for better type safety and to make it easier to maintain other invariants along with the map content.
The Map type is optimized for two common use cases: (1) when the entry for a given key is only ever written once but read many times, as in caches that only grow, or (2) when multiple goroutines read, write, and overwrite entries for disjoint sets of keys. In these two cases, use of a Map may significantly reduce lock contention compared to a Go map paired with a separate Mutex or RWMutex.
The zero Map is empty and ready for use. A Map must not be copied after first use.
func (*HandlerMap) Delete ¶
func (m *HandlerMap) Delete(key uint16)
Delete deletes the value for a key.
func (*HandlerMap) Load ¶
func (m *HandlerMap) Load(key uint16) (value *handlerInfo, ok bool)
Load returns the value stored in the map for a key, or nil if no value is present. The ok result indicates whether value was found in the map.
func (*HandlerMap) LoadAndDelete ¶
func (m *HandlerMap) LoadAndDelete(key uint16) (value *handlerInfo, loaded bool)
LoadAndDelete deletes the value for a key, returning the previous value if any. The loaded result reports whether the key was present.
func (*HandlerMap) LoadOrStore ¶
func (m *HandlerMap) LoadOrStore(key uint16, value *handlerInfo) (actual *handlerInfo, loaded bool)
LoadOrStore returns the existing value for the key if present. Otherwise, it stores and returns the given value. The loaded result is true if the value was loaded, false if stored.
func (*HandlerMap) Range ¶
func (m *HandlerMap) Range(f func(key uint16, value *handlerInfo) bool)
Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration.
Range does not necessarily correspond to any consistent snapshot of the Map's contents: no key will be visited more than once, but if the value for any key is stored or deleted concurrently, Range may reflect any mapping for that key from any point during the Range call.
Range may be O(N) with the number of elements in the map even if f returns false after a constant number of calls.
func (*HandlerMap) Store ¶
func (m *HandlerMap) Store(key uint16, value *handlerInfo)
Store sets the value for a key.
type HonorMemberInfo ¶
type INotifyEvent ¶
type LoginError ¶
type LoginError int
type LoginResponse ¶
type Loginsiginfo ¶
type Loginsiginfo struct {
// contains filtered or unexported fields
}
type MemberCardUpdatedEvent ¶
type MemberCardUpdatedEvent struct { Group *GroupInfo OldCard string Member *GroupMemberInfo }
type MemberHonorChangedNotifyEvent ¶
MemberHonorChangedNotifyEvent 群成员荣誉变更提示事件
func (*MemberHonorChangedNotifyEvent) Content ¶
func (e *MemberHonorChangedNotifyEvent) Content() string
func (*MemberHonorChangedNotifyEvent) From ¶
func (e *MemberHonorChangedNotifyEvent) From() int64
type MemberJoinGroupEvent ¶
type MemberJoinGroupEvent struct { Group *GroupInfo Member *GroupMemberInfo }
type MemberLeaveGroupEvent ¶
type MemberLeaveGroupEvent struct { Group *GroupInfo Member *GroupMemberInfo Operator *GroupMemberInfo }
type MemberPermission ¶
type MemberPermission int
type MemberPermissionChangedEvent ¶
type MemberPermissionChangedEvent struct { Group *GroupInfo Member *GroupMemberInfo OldPermission MemberPermission NewPermission MemberPermission }
type MemberSpecialTitleUpdatedEvent ¶
MemberSpecialTitleUpdatedEvent 群成员头衔更新事件
type ModelReq ¶
type ModelReq struct {
Req ModelReqData `json:"req"`
}
type ModelReqData ¶
type ModelVariant ¶
type NewFriendEvent ¶
type NewFriendEvent struct {
Friend *FriendInfo
}
type NewFriendRequest ¶
type NewFriendRequest struct { RequestId int64 Message string RequesterUin int64 RequesterNick string // contains filtered or unexported fields }
func (*NewFriendRequest) Accept ¶
func (r *NewFriendRequest) Accept()
func (*NewFriendRequest) Reject ¶
func (r *NewFriendRequest) Reject()
type OcrResponse ¶
type OcrResponse struct { Texts []*TextDetection `json:"texts"` Language string `json:"language"` }
type OfflineFileEvent ¶
type OtherClientInfo ¶
type OtherClientStatusChangedEvent ¶
type OtherClientStatusChangedEvent struct { Client *OtherClientInfo Online bool }
type QQClient ¶
type QQClient struct { Uin int64 PasswordMd5 [16]byte // option AllowSlider bool // account info Nickname string Age uint16 Gender uint16 FriendList []*FriendInfo GroupList []*GroupInfo OnlineClients []*OtherClientInfo Online bool QiDian *QiDianAccountInfo GuildService *GuildService // protocol public field SequenceId int32 OutGoingPacketSessionId []byte RandomKey []byte TCP *utils.TCPListener ConnectTime time.Time // contains filtered or unexported fields }
func NewClientEmpty ¶
func NewClientEmpty() *QQClient
func NewClientMd5 ¶
func (*QQClient) AddGroupNoticeSimple ¶
AddGroupNoticeSimple 发群公告
func (*QQClient) AddGroupNoticeWithPic ¶
AddGroupNoticeWithPic 发群公告带图片
func (*QQClient) CheckUrlSafely ¶
func (c *QQClient) CheckUrlSafely(url string) UrlSecurityLevel
CheckUrlSafely 通过TX服务器检查URL安全性
func (*QQClient) ConnectionQualityTest ¶
func (c *QQClient) ConnectionQualityTest() *ConnectionQualityInfo
func (*QQClient) DeleteEssenceMessage ¶
DeleteEssenceMessage 移出群精华消息
func (*QQClient) DeleteFriend ¶
func (*QQClient) DeleteUnidirectionalFriend ¶
func (*QQClient) DownloadForwardMessage ¶
func (c *QQClient) DownloadForwardMessage(resId string) *message.ForwardElement
func (*QQClient) FetchQRCode ¶
func (c *QQClient) FetchQRCode() (*QRCodeLoginResponse, error)
func (*QQClient) FindFriend ¶
func (c *QQClient) FindFriend(uin int64) *FriendInfo
func (*QQClient) FindGroupByUin ¶
func (*QQClient) GetAllowedClients ¶
func (c *QQClient) GetAllowedClients() ([]*OtherClientInfo, error)
GetAllowedClients 获取已允许的其他客户端
func (*QQClient) GetAtAllRemain ¶
func (c *QQClient) GetAtAllRemain(groupCode int64) (*AtAllRemainInfo, error)
func (*QQClient) GetCustomFaces ¶
func (c *QQClient) GetCustomFaces() ([]*CustomFace, error)
func (*QQClient) GetForwardMessage ¶
func (c *QQClient) GetForwardMessage(resID string) *message.ForwardMessage
func (*QQClient) GetFriendList ¶
func (c *QQClient) GetFriendList() (*FriendListResponse, error)
GetFriendList 当使用普通QQ时: 请求好友列表 当使用企点QQ时: 请求外部联系人列表
func (*QQClient) GetGroupEssenceMsgList ¶
func (c *QQClient) GetGroupEssenceMsgList(groupCode int64) ([]GroupDigest, error)
GetGroupEssenceMsgList 获取群精华消息列表
func (*QQClient) GetGroupFileSystem ¶
func (c *QQClient) GetGroupFileSystem(groupCode int64) (fs *GroupFileSystem, err error)
func (*QQClient) GetGroupFileUrl ¶
func (*QQClient) GetGroupHonorInfo ¶
func (c *QQClient) GetGroupHonorInfo(groupCode int64, honorType HonorType) (*GroupHonorInfo, error)
func (*QQClient) GetGroupImageDownloadUrl ¶
func (*QQClient) GetGroupInfo ¶
func (*QQClient) GetGroupList ¶
func (*QQClient) GetGroupMembers ¶
func (c *QQClient) GetGroupMembers(group *GroupInfo) ([]*GroupMemberInfo, error)
func (*QQClient) GetGroupMessages ¶
func (c *QQClient) GetGroupMessages(groupCode, beginSeq, endSeq int64) ([]*message.GroupMessage, error)
GetGroupMessages 从服务器获取历史信息
func (*QQClient) GetGroupSystemMessages ¶
func (c *QQClient) GetGroupSystemMessages() (*GroupSystemMessages, error)
func (*QQClient) GetMemberInfo ¶
func (c *QQClient) GetMemberInfo(groupCode, memberUin int64) (*GroupMemberInfo, error)
func (*QQClient) GetModelShow ¶
func (c *QQClient) GetModelShow(modelName string) ([]*ModelVariant, error)
func (*QQClient) GetShortVideoUrl ¶
func (*QQClient) GetStatistics ¶
func (c *QQClient) GetStatistics() *Statistics
func (*QQClient) GetSummaryInfo ¶
func (c *QQClient) GetSummaryInfo(target int64) (*SummaryCardInfo, error)
func (*QQClient) GetUnidirectionalFriendList ¶
func (c *QQClient) GetUnidirectionalFriendList() (ret []*UnidirectionalFriendInfo, err error)
func (*QQClient) GetWordSegmentation ¶
func (*QQClient) Getprivatecookie ¶
func (*QQClient) ImageOcr ¶
func (c *QQClient) ImageOcr(img interface{}) (*OcrResponse, error)
func (*QQClient) Login ¶
func (c *QQClient) Login() (*LoginResponse, error)
Login send login request
func (*QQClient) MarkGroupMessageReaded ¶
MarkGroupMessageReaded 标记群消息已读, 适当调用应该能减少风控
func (*QQClient) MarkPrivateMessageReaded ¶
func (*QQClient) OnDisconnected ¶
func (c *QQClient) OnDisconnected(f func(*QQClient, *ClientDisconnectedEvent))
func (*QQClient) OnFriendMessageRecalled ¶
func (c *QQClient) OnFriendMessageRecalled(f func(*QQClient, *FriendMessageRecalledEvent))
func (*QQClient) OnFriendNotify ¶
func (c *QQClient) OnFriendNotify(f func(*QQClient, INotifyEvent))
func (*QQClient) OnGroupDigest ¶
func (c *QQClient) OnGroupDigest(f func(*QQClient, *GroupDigestEvent))
OnGroupDigest 群精华消息事件注册
func (*QQClient) OnGroupInvited ¶
func (c *QQClient) OnGroupInvited(f func(*QQClient, *GroupInvitedRequest))
func (*QQClient) OnGroupMemberCardUpdated ¶
func (c *QQClient) OnGroupMemberCardUpdated(f func(*QQClient, *MemberCardUpdatedEvent))
func (*QQClient) OnGroupMemberJoined ¶
func (c *QQClient) OnGroupMemberJoined(f func(*QQClient, *MemberJoinGroupEvent))
func (*QQClient) OnGroupMemberLeaved ¶
func (c *QQClient) OnGroupMemberLeaved(f func(*QQClient, *MemberLeaveGroupEvent))
func (*QQClient) OnGroupMemberPermissionChanged ¶
func (c *QQClient) OnGroupMemberPermissionChanged(f func(*QQClient, *MemberPermissionChangedEvent))
func (*QQClient) OnGroupMessage ¶
func (c *QQClient) OnGroupMessage(f func(*QQClient, *message.GroupMessage))
func (*QQClient) OnGroupMessageRecalled ¶
func (c *QQClient) OnGroupMessageRecalled(f func(*QQClient, *GroupMessageRecalledEvent))
func (*QQClient) OnGroupMuted ¶
func (c *QQClient) OnGroupMuted(f func(*QQClient, *GroupMuteEvent))
func (*QQClient) OnGroupNameUpdated ¶
func (c *QQClient) OnGroupNameUpdated(f func(*QQClient, *GroupNameUpdatedEvent))
func (*QQClient) OnGroupNotify ¶
func (c *QQClient) OnGroupNotify(f func(*QQClient, INotifyEvent))
func (*QQClient) OnJoinGroup ¶
func (*QQClient) OnLeaveGroup ¶
func (c *QQClient) OnLeaveGroup(f func(*QQClient, *GroupLeaveEvent))
func (*QQClient) OnMemberSpecialTitleUpdated ¶
func (c *QQClient) OnMemberSpecialTitleUpdated(f func(*QQClient, *MemberSpecialTitleUpdatedEvent))
func (*QQClient) OnNewFriendAdded ¶
func (c *QQClient) OnNewFriendAdded(f func(*QQClient, *NewFriendEvent))
func (*QQClient) OnNewFriendRequest ¶
func (c *QQClient) OnNewFriendRequest(f func(*QQClient, *NewFriendRequest))
func (*QQClient) OnOtherClientStatusChanged ¶
func (c *QQClient) OnOtherClientStatusChanged(f func(*QQClient, *OtherClientStatusChangedEvent))
func (*QQClient) OnPrivateMessage ¶
func (c *QQClient) OnPrivateMessage(f func(*QQClient, *message.PrivateMessage))
func (*QQClient) OnPrivateMessageF ¶
func (c *QQClient) OnPrivateMessageF(filter func(*message.PrivateMessage) bool, f func(*QQClient, *message.PrivateMessage))
func (*QQClient) OnReceivedOfflineFile ¶
func (c *QQClient) OnReceivedOfflineFile(f func(*QQClient, *OfflineFileEvent))
func (*QQClient) OnSelfGroupMessage ¶
func (c *QQClient) OnSelfGroupMessage(f func(*QQClient, *message.GroupMessage))
func (*QQClient) OnSelfPrivateMessage ¶
func (c *QQClient) OnSelfPrivateMessage(f func(*QQClient, *message.PrivateMessage))
func (*QQClient) OnServerUpdated ¶
func (c *QQClient) OnServerUpdated(f func(*QQClient, *ServerUpdatedEvent) bool)
func (*QQClient) OnTempMessage ¶
func (c *QQClient) OnTempMessage(f func(*QQClient, *TempMessageEvent))
func (*QQClient) OnUserWantJoinGroup ¶
func (c *QQClient) OnUserWantJoinGroup(f func(*QQClient, *UserJoinGroupRequest))
func (*QQClient) QRCodeLogin ¶
func (c *QQClient) QRCodeLogin(info *QRCodeLoginInfo) (*LoginResponse, error)
func (*QQClient) QueryFriendImage ¶
func (*QQClient) QueryGroupImage ¶
func (*QQClient) QueryQRCodeStatus ¶
func (c *QQClient) QueryQRCodeStatus(sig []byte) (*QRCodeLoginResponse, error)
func (*QQClient) RecallGroupMessage ¶
func (*QQClient) RecallPrivateMessage ¶
func (*QQClient) ReloadFriendList ¶
ReloadFriendList refresh QQClient.FriendList field via GetFriendList()
func (*QQClient) ReloadGroupList ¶
func (*QQClient) RequestSMS ¶
func (*QQClient) SearchGroupByKeyword ¶
func (c *QQClient) SearchGroupByKeyword(keyword string) ([]GroupSearchInfo, error)
SearchGroupByKeyword 通过关键词搜索陌生群组
func (*QQClient) SendFriendMusicShare ¶
func (c *QQClient) SendFriendMusicShare(target int64, msg *message.MusicShareElement)
SendFriendMusicShare 发送好友音乐卡片
func (*QQClient) SendFriendPoke ¶
func (*QQClient) SendGroupForwardMessage ¶
func (c *QQClient) SendGroupForwardMessage(groupCode int64, m *message.ForwardElement) *message.GroupMessage
SendGroupForwardMessage 发送群合并转发消息
func (*QQClient) SendGroupGift ¶
func (*QQClient) SendGroupMessage ¶
func (c *QQClient) SendGroupMessage(groupCode int64, m *message.SendingMessage, f ...bool) *message.GroupMessage
SendGroupMessage 发送群消息
func (*QQClient) SendGroupMusicShare ¶
func (c *QQClient) SendGroupMusicShare(target int64, msg *message.MusicShareElement) (*message.GroupMessage, error)
SendGroupMusicShare 发送群聊音乐卡片
func (*QQClient) SendGroupPoke ¶
func (*QQClient) SendGroupTempMessage ¶
func (c *QQClient) SendGroupTempMessage(groupCode, target int64, m *message.SendingMessage) *message.TempMessage
func (*QQClient) SendPrivateMessage ¶
func (c *QQClient) SendPrivateMessage(target int64, m *message.SendingMessage) *message.PrivateMessage
func (*QQClient) SetCustomServer ¶
func (*QQClient) SetEssenceMessage ¶
SetEssenceMessage 设为群精华消息
func (*QQClient) SetModelShow ¶
func (*QQClient) SetOnlineStatus ¶
func (c *QQClient) SetOnlineStatus(s UserOnlineStatus)
func (*QQClient) SolveFriendRequest ¶
func (c *QQClient) SolveFriendRequest(req *NewFriendRequest, accept bool)
func (*QQClient) SolveGroupJoinRequest ¶
func (*QQClient) SubmitCaptcha ¶
func (c *QQClient) SubmitCaptcha(result string, sign []byte) (*LoginResponse, error)
SubmitCaptcha send captcha to server
func (*QQClient) SubmitTicket ¶
func (c *QQClient) SubmitTicket(ticket string) (*LoginResponse, error)
func (*QQClient) SyncSessions ¶
func (c *QQClient) SyncSessions() (*SessionSyncResponse, error)
SyncSessions 同步会话列表
func (*QQClient) TokenLogin ¶
func (*QQClient) UploadGroupForwardMessage ¶
func (c *QQClient) UploadGroupForwardMessage(groupCode int64, m *message.ForwardMessage) *message.ForwardElement
func (*QQClient) UploadGroupImage ¶
func (c *QQClient) UploadGroupImage(groupCode int64, img io.ReadSeeker) (*message.GroupImageElement, error)
func (*QQClient) UploadGroupImageByFile ¶
func (*QQClient) UploadGroupPtt ¶
func (c *QQClient) UploadGroupPtt(groupCode int64, voice io.ReadSeeker) (*message.GroupVoiceElement, error)
UploadGroupPtt 将语音数据使用群语音通道上传到服务器, 返回 message.GroupVoiceElement 可直接发送
func (*QQClient) UploadGroupShortVideo ¶
func (c *QQClient) UploadGroupShortVideo(groupCode int64, video, thumb io.ReadSeeker, combinedCache ...string) (*message.ShortVideoElement, error)
UploadGroupShortVideo 将视频和封面上传到服务器, 返回 message.ShortVideoElement 可直接发送 combinedCache 本地文件缓存, 设置后可多线程上传
func (*QQClient) UploadPrivateImage ¶
func (c *QQClient) UploadPrivateImage(target int64, img io.ReadSeeker) (*message.FriendImageElement, error)
func (*QQClient) UploadPrivatePtt ¶
func (c *QQClient) UploadPrivatePtt(target int64, voice io.ReadSeeker) (*message.PrivateVoiceElement, error)
UploadPrivatePtt 将语音数据使用好友语音通道上传到服务器, 返回 message.PrivateVoiceElement 可直接发送
func (*QQClient) UseDevice ¶
func (c *QQClient) UseDevice(info *DeviceInfo)
type QRCodeLoginInfo ¶
type QRCodeLoginInfo struct {
// contains filtered or unexported fields
}
type QRCodeLoginResponse ¶
type QRCodeLoginResponse struct { State QRCodeLoginState ImageData []byte Sig []byte LoginInfo *QRCodeLoginInfo }
type QRCodeLoginState ¶
type QRCodeLoginState int
type QiDianAccountInfo ¶
type ServerUpdatedEvent ¶
type ServerUpdatedEvent struct {
Servers []jce.SsoServerInfo
}
type SessionSyncResponse ¶
type SessionSyncResponse struct {
GroupSessions []*GroupSessionInfo
}
SessionSyncResponse 会话同步结果
type Statistics ¶
type Statistics struct { PacketReceived uint64 PacketSent uint64 PacketLost uint64 MessageReceived uint64 MessageSent uint64 LastMessageTime int64 DisconnectTimes uint32 LostTimes uint32 }
func (*Statistics) MarshalJSON ¶
func (s *Statistics) MarshalJSON() ([]byte, error)
type SummaryCardInfo ¶
type TempMessageEvent ¶
type TempMessageEvent struct { Message *message.TempMessage Session *TempSessionInfo }
type TempSessionInfo ¶
type TempSessionInfo struct { Source TempSessionSource GroupCode int64 Sender int64 // contains filtered or unexported fields }
func (*TempSessionInfo) SendMessage ¶
func (s *TempSessionInfo) SendMessage(m *message.SendingMessage) (*message.TempMessage, error)
type TempSessionSource ¶
type TempSessionSource int
const ( GroupSource TempSessionSource = 0 // 来自群聊 ConsultingSource TempSessionSource = 1 // 来自QQ咨询 SearchSource TempSessionSource = 2 // 来自查找 MovieSource TempSessionSource = 3 // 来自QQ电影 HotChatSource TempSessionSource = 4 // 来自热聊 SystemMessageSource TempSessionSource = 6 // 来自验证消息 MultiChatSource TempSessionSource = 7 // 来自多人聊天 DateSource TempSessionSource = 8 // 来自约会 AddressBookSource TempSessionSource = 9 // 来自通讯录 )
type TextDetection ¶
type TextDetection struct { Text string `json:"text"` Confidence int32 `json:"confidence"` Coordinates []*Coordinate `json:"coordinates"` }
type UrlSecurityLevel ¶
type UrlSecurityLevel int
const ( Safe UrlSecurityLevel = 1 Unknown UrlSecurityLevel = 2 Danger UrlSecurityLevel = 3 )
type UserJoinGroupRequest ¶
type UserJoinGroupRequest struct { RequestId int64 `json:"request_id"` Message string `json:"message"` RequesterUin int64 `json:"requester_uin"` RequesterNick string `json:"requester_nick"` GroupCode int64 `json:"group_id"` GroupName string `json:"group_name"` ActionUinNick string `json:"action_uin_nick"` ActionUin int64 `json:"action_uin"` Checked bool `json:"checked"` Actor int64 `json:"actor"` Suspicious bool `json:"suspicious"` // contains filtered or unexported fields }
func (*UserJoinGroupRequest) Accept ¶
func (r *UserJoinGroupRequest) Accept()
func (*UserJoinGroupRequest) Reject ¶
func (r *UserJoinGroupRequest) Reject(block bool, reason string)
type UserOnlineStatus ¶
type UserOnlineStatus int
type VersionFile ¶
Source Files ¶
- builders.go
- c2c_processor.go
- c2c_switch.go
- client.go
- decoders.go
- entities.go
- events.go
- face.go
- global.go
- group_file.go
- group_info.go
- group_msg.go
- guild.go
- handler_map_gen.go
- highway.go
- http_api.go
- image.go
- model_show.go
- multimsg.go
- network.go
- notify.go
- offline_file.go
- online_push.go
- private_msg.go
- ptt.go
- qidian.go
- recall.go
- richmsg.go
- security.go
- statistics.go
- sync.go
- system_msg.go
- tlv_decoders.go
- translate.go
- web.go