Documentation ¶
Index ¶
- Constants
- Variables
- func GenIMEI() string
- func NewUinFilterPrivate(uin int64) func(*message.PrivateMessage) bool
- func UpdateAppVersion(protocolType auth.ProtocolType, data []byte) error
- type AtAllRemainInfo
- type ChannelInfo
- type ChannelMeta
- type ChannelSlowModeInfo
- type ChannelType
- type ClientDisconnectedEvent
- type ClientProtocol
- type ConnectionQualityInfo
- type Coordinate
- type CurrentTalkative
- type CustomFace
- type DeleteFriendEvent
- type DeviceInfo
- type EventHandle
- type FetchGuildMemberListWithRoleResult
- type ForwardMessageBuilder
- type FriendInfo
- type FriendListResponse
- type FriendMessageRecalledEvent
- type FriendPokeNotifyEvent
- type GroupDigest
- type GroupDigestEvent
- type GroupDisbandEvent
- 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) MoveFile(parentFolderID, fileId string, busId int32, DestFolderId string) string
- func (fs *GroupFileSystem) RenameFile(parentFolderID, fileId string, busId int32, newFileName string) string
- 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) any) any
- func (g *GroupInfo) SelfPermission() MemberPermission
- func (g *GroupInfo) SetAnonymous(enable bool)
- func (g *GroupInfo) Update(f func(*GroupInfo))
- func (g *GroupInfo) UpdateGroupHeadPortrait(img []byte)
- 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 GroupNoticeFeed
- type GroupNoticeImage
- type GroupNoticeMessage
- type GroupPokeNotifyEvent
- type GroupRedBagLuckyKingNotifyEvent
- type GroupSearchInfo
- type GroupSessionInfo
- type GroupSystemMessages
- type GuildChannelOperationEvent
- type GuildChannelUpdatedEvent
- type GuildInfo
- type GuildMemberInfo
- type GuildMessageReactionsUpdatedEvent
- type GuildMessageRecalledEvent
- type GuildMeta
- type GuildRole
- type GuildService
- func (s *GuildService) CreateGuildRole(guildId uint64, name string, color uint32, independent bool, ...) (uint64, error)
- func (s *GuildService) DeleteGuildRole(guildId uint64, roleId uint64) error
- func (s *GuildService) FetchChannelInfo(guildId, channelId uint64) (*ChannelInfo, error)
- func (s *GuildService) FetchChannelList(guildId uint64) (r []*ChannelInfo, e error)
- func (s *GuildService) FetchGuestGuild(guildId uint64) (*GuildMeta, error)
- func (s *GuildService) FetchGuildMemberListWithRole(guildId, channelId uint64, startIndex uint32, roleIdIndex uint64, param string) (*FetchGuildMemberListWithRoleResult, error)
- func (s *GuildService) FetchGuildMemberProfileInfo(guildId, tinyId uint64) (*GuildUserProfile, error)
- func (s *GuildService) FindGuild(guildId uint64) *GuildInfo
- func (s *GuildService) GetGuildRoles(guildId uint64) ([]*GuildRole, error)
- func (s *GuildService) GetTopicChannelFeeds(guildId, channelId uint64) ([]*topic.Feed, error)
- func (s *GuildService) GetUserProfile(tinyId uint64) (*GuildUserProfile, error)
- func (s *GuildService) ModifyRoleInGuild(guildId uint64, roleId uint64, name string, color uint32, indepedent bool) error
- func (s *GuildService) OnGuildChannelCreated(f func(*QQClient, *GuildChannelOperationEvent))
- func (s *GuildService) OnGuildChannelDestroyed(f func(*QQClient, *GuildChannelOperationEvent))
- func (s *GuildService) OnGuildChannelMessage(f func(*QQClient, *message.GuildChannelMessage))
- func (s *GuildService) OnGuildChannelUpdated(f func(*QQClient, *GuildChannelUpdatedEvent))
- func (s *GuildService) OnGuildMessageReactionsUpdated(f func(*QQClient, *GuildMessageReactionsUpdatedEvent))
- func (s *GuildService) OnGuildMessageRecalled(f func(*QQClient, *GuildMessageRecalledEvent))
- func (s *GuildService) OnMemberJoinedGuild(f func(*QQClient, *MemberJoinGuildEvent))
- func (s *GuildService) PostTopicChannelFeed(guildId, channelId uint64, feed *topic.Feed) error
- func (s *GuildService) PullGuildChannelMessage(guildId, channelId, beginSeq, endSeq uint64) (r []*message.GuildChannelMessage, e error)
- func (s *GuildService) QueryImage(guildId, channelId uint64, hash []byte, size uint64) (*message.GuildImageElement, error)
- func (s *GuildService) SendGuildChannelMessage(guildId, channelId uint64, m *message.SendingMessage) (*message.GuildChannelMessage, error)
- func (s *GuildService) SetUserRoleInGuild(guildId uint64, set bool, roleId uint64, user []uint64) error
- func (s *GuildService) UploadGuildImage(guildId, channelId uint64, img io.ReadSeeker) (*message.GuildImageElement, error)deprecated
- type GuildUserProfile
- type HonorMemberInfo
- type HonorType
- type INotifyEvent
- type LocalFile
- type Logger
- type LoginError
- type LoginResponse
- type MemberCardUpdatedEvent
- type MemberHonorChangedNotifyEvent
- type MemberJoinGroupEvent
- type MemberJoinGuildEvent
- 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 ProfileDetailUpdate
- func (p ProfileDetailUpdate) College(value string) ProfileDetailUpdate
- func (p ProfileDetailUpdate) Company(value string) ProfileDetailUpdate
- func (p ProfileDetailUpdate) Email(value string) ProfileDetailUpdate
- func (p ProfileDetailUpdate) Nick(value string) ProfileDetailUpdate
- func (p ProfileDetailUpdate) PersonalNote(value string) ProfileDetailUpdate
- type QQClient
- func (c *QQClient) AddGroupNoticeSimple(groupCode int64, text string) (noticeId string, err error)
- func (c *QQClient) AddGroupNoticeWithPic(groupCode int64, text string, pic []byte) (noticeId string, err error)
- func (c *QQClient) CheckUrlSafely(url string) UrlSecurityLevel
- func (c *QQClient) ConnectionQualityTest() *ConnectionQualityInfo
- func (c *QQClient) DelGroupNotice(groupCode int64, fid string) error
- 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) Device() *DeviceInfo
- func (c *QQClient) Disconnect()
- func (c *QQClient) DownloadForwardMessage(resId string) *message.ForwardElement
- func (c *QQClient) FetchQRCode() (*QRCodeLoginResponse, error)
- func (c *QQClient) FetchQRCodeCustomSize(size, margin, ecLevel uint32) (*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) GetGroupNotice(groupCode int64) (l []*GroupNoticeMessage, err 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) GetWordSegmentation(text string) ([]string, error)
- func (c *QQClient) ImageOcr(img any) (*OcrResponse, error)
- func (c *QQClient) Login() (*LoginResponse, error)
- func (c *QQClient) MarkGroupMessageReaded(groupCode, seq int64)
- func (c *QQClient) MarkPrivateMessageReaded(uin, time int64)
- func (c *QQClient) NewForwardMessageBuilder(groupCode int64) *ForwardMessageBuilder
- func (c *QQClient) OnServerUpdated(f func(*QQClient, *ServerUpdatedEvent) bool)
- 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) SendGroupMessage(groupCode int64, m *message.SendingMessage) *message.GroupMessage
- func (c *QQClient) SendGroupMusicShare(target int64, msg *message.MusicShareElement) (*message.GroupMessage, error)
- func (c *QQClient) SendGroupPoke(groupCode, target int64)
- func (c *QQClient) SendGroupSign(target int64)
- func (c *QQClient) SendGroupTempMessage(groupCode, target int64, m *message.SendingMessage) *message.TempMessage
- func (c *QQClient) SendGuildMusicShare(guildID, channelID uint64, msg *message.MusicShareElement)
- func (c *QQClient) SendPrivateMessage(target int64, m *message.SendingMessage) *message.PrivateMessage
- func (c *QQClient) SetCustomServer(servers []netip.AddrPort)
- func (c *QQClient) SetEssenceMessage(groupCode int64, msgID, msgInternalId int32) error
- func (c *QQClient) SetLogger(logger Logger)
- 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 any, 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) SubscribeEventHandler(handler any)
- func (c *QQClient) SyncSessions() (*SessionSyncResponse, error)
- func (c *QQClient) TokenLogin(token []byte) error
- func (c *QQClient) Translate(src, dst, text string) (string, error)
- func (c *QQClient) UpdateProfile(profile ProfileDetailUpdate)
- func (c *QQClient) UploadFile(target message.Source, file *LocalFile) error
- func (c *QQClient) UploadImage(target message.Source, img io.ReadSeeker) (message.IMessageElement, error)
- func (c *QQClient) UploadShortVideo(target message.Source, video, thumb io.ReadSeeker) (*message.ShortVideoElement, error)
- func (c *QQClient) UploadVoice(target message.Source, voice io.ReadSeeker) (*message.GroupVoiceElement, error)
- func (c *QQClient) UseDevice(info *auth.Device)
- func (c *QQClient) WQGetCookiesAllC() string
- func (c *QQClient) WQGetCookiesWithDomain(domain string) (cookies string, skey string)
- 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
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 Unset = auth.Unset AndroidPhone = auth.AndroidPhone AndroidWatch = auth.AndroidWatch MacOS = auth.MacOS QiDian = auth.QiDian IPad = auth.IPad AndroidPad = auth.AndroidPad )
const (
UnknownDecoder = iota
)
Variables ¶
var ( ErrAlreadyOnline = errors.New("already online") ErrMemberNotFound = errors.New("member not found") ErrNotExists = errors.New("not exists") )
var EmptyBytes = make([]byte, 0)
Functions ¶
func NewUinFilterPrivate ¶
func NewUinFilterPrivate(uin int64) func(*message.PrivateMessage) bool
func UpdateAppVersion ¶
func UpdateAppVersion(protocolType auth.ProtocolType, data []byte) error
Types ¶
type AtAllRemainInfo ¶
type ChannelInfo ¶
type ChannelInfo struct { ChannelId uint64 ChannelName string Time uint64 EventTime uint32 NotifyType uint32 ChannelType ChannelType AtAllSeq uint64 Meta *ChannelMeta // contains filtered or unexported fields }
ChannelInfo 子频道信息
type ChannelMeta ¶
type ChannelSlowModeInfo ¶
type ChannelType ¶
type ChannelType int32
const ( ChannelTypeText ChannelType = 1 ChannelTypeVoice ChannelType = 2 ChannelTypeLive ChannelType = 5 ChannelTypeTopic ChannelType = 7 )
type ClientDisconnectedEvent ¶
type ClientDisconnectedEvent struct {
Message string
}
type ClientProtocol ¶
type ClientProtocol = auth.ProtocolType
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 DeleteFriendEvent ¶
type DeviceInfo ¶
func GenRandomDevice ¶
func GenRandomDevice() *DeviceInfo
type EventHandle ¶
type EventHandle[T any] struct { // contains filtered or unexported fields }
func (*EventHandle[T]) Subscribe ¶
func (handle *EventHandle[T]) Subscribe(handler func(client *QQClient, event T))
type FetchGuildMemberListWithRoleResult ¶
type FetchGuildMemberListWithRoleResult struct { Members []*GuildMemberInfo NextIndex uint32 NextRoleId uint64 NextQueryParam string Finished bool }
type ForwardMessageBuilder ¶
type ForwardMessageBuilder struct {
// contains filtered or unexported fields
}
func (*ForwardMessageBuilder) Link ¶
func (builder *ForwardMessageBuilder) Link(reloc *message.ForwardElement, fmsg *message.ForwardMessage)
Link 将真实的消息内容填充 reloc
func (*ForwardMessageBuilder) Main ¶
func (builder *ForwardMessageBuilder) Main(m *message.ForwardMessage) *message.ForwardElement
Main 最外层的转发消息, 调用该方法后即上传消息
func (*ForwardMessageBuilder) NestedNode ¶
func (builder *ForwardMessageBuilder) NestedNode() *message.ForwardElement
NestedNode 返回一个嵌套转发节点,其内容将会被 Builder 重定位
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 GroupDisbandEvent ¶
type GroupDisbandEvent struct { Group *GroupInfo Time int64 Operator *GroupMemberInfo }
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) MoveFile ¶
func (fs *GroupFileSystem) MoveFile(parentFolderID, fileId string, busId int32, DestFolderId string) string
MoveFile 移动群文件,需要管理权限或者是自己发的文件. 返回错误, 空为移动成功
func (*GroupFileSystem) RenameFile ¶
func (fs *GroupFileSystem) RenameFile(parentFolderID, fileId string, busId int32, newFileName string) string
RenameFile 重命名群文件,需要管理权限或者是自己发的文件. 返回错误, 空为重命名成功
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 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) SetAnonymous ¶
func (*GroupInfo) UpdateGroupHeadPortrait ¶
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 Nickname string CardName string JoinTime int64 LastSpeakTime int64 SpecialTitle string ShutUpTimestamp int64 Permission MemberPermission Level uint16 Gender byte }
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 GroupNoticeFeed ¶
type GroupNoticeImage ¶
type GroupNoticeMessage ¶
type GroupNoticeMessage struct { NoticeId string `json:"notice_id"` SenderId uint32 `json:"sender_id"` PublishTime uint64 `json:"publish_time"` Message struct { Text string `json:"text"` Images []GroupNoticeImage `json:"images"` } `json:"message"` }
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 GuildChannelOperationEvent ¶
type GuildChannelOperationEvent struct { OperatorId uint64 GuildId uint64 ChannelInfo *ChannelInfo }
type GuildChannelUpdatedEvent ¶
type GuildChannelUpdatedEvent struct { OperatorId uint64 GuildId uint64 ChannelId uint64 OldChannelInfo *ChannelInfo NewChannelInfo *ChannelInfo }
type GuildInfo ¶
type GuildInfo struct { GuildId uint64 GuildCode uint64 GuildName string CoverUrl string AvatarUrl string Channels []*ChannelInfo }
GuildInfo 频道信息
func (*GuildInfo) FindChannel ¶
func (g *GuildInfo) FindChannel(channelId uint64) *ChannelInfo
type GuildMemberInfo ¶
type GuildMemberInfo struct { TinyId uint64 Title string Nickname string LastSpeakTime int64 Role uint64 RoleName string }
GuildMemberInfo 频道成员信息, 仅通过频道成员列表API获取
type GuildMessageReactionsUpdatedEvent ¶
type GuildMessageReactionsUpdatedEvent struct { OperatorId uint64 // OperatorId 操作者TinyId, 删除贴表情的事件下不会有值 EmojiId int32 // EmojiId 被贴的表情, 只有自身消息被贴表情才会有值 GuildId uint64 ChannelId uint64 MessageId uint64 // MessageSenderUin int64 // MessageSenderUin 被贴表情的消息发送者QQ号 CurrentReactions []*message.GuildMessageEmojiReaction }
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 GuildRole ¶
type GuildRole struct { RoleId uint64 RoleName string ArgbColor uint32 Independent bool Num int32 Owned bool Disabled bool MaxNum int32 }
GuildRole 频道身份组信息
type GuildService ¶
type GuildService struct { TinyId uint64 Nickname string AvatarUrl string GuildCount uint32 // Guilds 由服务器推送的频道列表 Guilds []*GuildInfo // contains filtered or unexported fields }
GuildService 频道模块内自身的信息
func (*GuildService) CreateGuildRole ¶
func (*GuildService) DeleteGuildRole ¶
func (s *GuildService) DeleteGuildRole(guildId uint64, roleId uint64) error
func (*GuildService) FetchChannelInfo ¶
func (s *GuildService) FetchChannelInfo(guildId, channelId uint64) (*ChannelInfo, error)
func (*GuildService) FetchChannelList ¶
func (s *GuildService) FetchChannelList(guildId uint64) (r []*ChannelInfo, e error)
func (*GuildService) FetchGuestGuild ¶
func (s *GuildService) FetchGuestGuild(guildId uint64) (*GuildMeta, error)
func (*GuildService) FetchGuildMemberListWithRole ¶
func (s *GuildService) FetchGuildMemberListWithRole(guildId, channelId uint64, startIndex uint32, roleIdIndex uint64, param string) (*FetchGuildMemberListWithRoleResult, error)
FetchGuildMemberListWithRole 获取频道成员列表 第一次请求: startIndex = 0 , roleIdIndex = 2 param = "" 后续请求请根据上次请求的返回值进行设置
func (*GuildService) FetchGuildMemberProfileInfo ¶
func (s *GuildService) FetchGuildMemberProfileInfo(guildId, tinyId uint64) (*GuildUserProfile, error)
FetchGuildMemberProfileInfo 获取单个频道成员资料
func (*GuildService) FindGuild ¶
func (s *GuildService) FindGuild(guildId uint64) *GuildInfo
func (*GuildService) GetGuildRoles ¶
func (s *GuildService) GetGuildRoles(guildId uint64) ([]*GuildRole, error)
func (*GuildService) GetTopicChannelFeeds ¶
func (s *GuildService) GetTopicChannelFeeds(guildId, channelId uint64) ([]*topic.Feed, error)
func (*GuildService) GetUserProfile ¶
func (s *GuildService) GetUserProfile(tinyId uint64) (*GuildUserProfile, error)
func (*GuildService) ModifyRoleInGuild ¶
func (*GuildService) OnGuildChannelCreated ¶
func (s *GuildService) OnGuildChannelCreated(f func(*QQClient, *GuildChannelOperationEvent))
func (*GuildService) OnGuildChannelDestroyed ¶
func (s *GuildService) OnGuildChannelDestroyed(f func(*QQClient, *GuildChannelOperationEvent))
func (*GuildService) OnGuildChannelMessage ¶
func (s *GuildService) OnGuildChannelMessage(f func(*QQClient, *message.GuildChannelMessage))
func (*GuildService) OnGuildChannelUpdated ¶
func (s *GuildService) OnGuildChannelUpdated(f func(*QQClient, *GuildChannelUpdatedEvent))
func (*GuildService) OnGuildMessageReactionsUpdated ¶
func (s *GuildService) OnGuildMessageReactionsUpdated(f func(*QQClient, *GuildMessageReactionsUpdatedEvent))
func (*GuildService) OnGuildMessageRecalled ¶
func (s *GuildService) OnGuildMessageRecalled(f func(*QQClient, *GuildMessageRecalledEvent))
func (*GuildService) OnMemberJoinedGuild ¶
func (s *GuildService) OnMemberJoinedGuild(f func(*QQClient, *MemberJoinGuildEvent))
func (*GuildService) PostTopicChannelFeed ¶
func (s *GuildService) PostTopicChannelFeed(guildId, channelId uint64, feed *topic.Feed) error
func (*GuildService) PullGuildChannelMessage ¶
func (s *GuildService) PullGuildChannelMessage(guildId, channelId, beginSeq, endSeq uint64) (r []*message.GuildChannelMessage, e error)
func (*GuildService) QueryImage ¶
func (s *GuildService) QueryImage(guildId, channelId uint64, hash []byte, size uint64) (*message.GuildImageElement, error)
func (*GuildService) SendGuildChannelMessage ¶
func (s *GuildService) SendGuildChannelMessage(guildId, channelId uint64, m *message.SendingMessage) (*message.GuildChannelMessage, error)
func (*GuildService) SetUserRoleInGuild ¶
func (*GuildService) UploadGuildImage
deprecated
func (s *GuildService) UploadGuildImage(guildId, channelId uint64, img io.ReadSeeker) (*message.GuildImageElement, error)
Deprecated: use QQClient.UploadImage instead
type GuildUserProfile ¶
type GuildUserProfile struct { TinyId uint64 Nickname string AvatarUrl string JoinTime int64 // 只有 GetGuildMemberProfileInfo 函数才会有 Roles []*GuildRole }
GuildUserProfile 频道系统用户资料
type HonorMemberInfo ¶
type INotifyEvent ¶
type LocalFile ¶
type LocalFile struct { FileName string Body io.ReadSeeker // LocalFile content body RemoteFolder string // contains filtered or unexported fields }
type LoginError ¶
type LoginError int
func (LoginError) String ¶
func (i LoginError) String() string
type LoginResponse ¶
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 MemberJoinGuildEvent ¶
type MemberJoinGuildEvent struct { Guild *GuildInfo Member *GuildMemberInfo }
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 ProfileDetailUpdate ¶
func NewProfileDetailUpdate ¶
func NewProfileDetailUpdate() ProfileDetailUpdate
func (ProfileDetailUpdate) College ¶
func (p ProfileDetailUpdate) College(value string) ProfileDetailUpdate
func (ProfileDetailUpdate) Company ¶
func (p ProfileDetailUpdate) Company(value string) ProfileDetailUpdate
func (ProfileDetailUpdate) Email ¶
func (p ProfileDetailUpdate) Email(value string) ProfileDetailUpdate
func (ProfileDetailUpdate) Nick ¶
func (p ProfileDetailUpdate) Nick(value string) ProfileDetailUpdate
func (ProfileDetailUpdate) PersonalNote ¶
func (p ProfileDetailUpdate) PersonalNote(value string) ProfileDetailUpdate
type QQClient ¶
type QQClient struct { Uin int64 PasswordMd5 [16]byte // option AllowSlider bool UseFragmentMessage bool // account info Online atomic.Bool Nickname string Age uint16 Gender uint16 FriendList []*FriendInfo GroupList []*GroupInfo OnlineClients []*OtherClientInfo QiDian *QiDianAccountInfo GuildService *GuildService // protocol public field SequenceId atomic.Int32 SessionId []byte TCP *network.TCPClient // todo: combine other protocol state into one struct ConnectTime time.Time PrivateMessageEvent EventHandle[*message.PrivateMessage] TempMessageEvent EventHandle[*TempMessageEvent] GroupMessageEvent EventHandle[*message.GroupMessage] SelfPrivateMessageEvent EventHandle[*message.PrivateMessage] SelfGroupMessageEvent EventHandle[*message.GroupMessage] GroupMuteEvent EventHandle[*GroupMuteEvent] GroupMessageRecalledEvent EventHandle[*GroupMessageRecalledEvent] FriendMessageRecalledEvent EventHandle[*FriendMessageRecalledEvent] GroupJoinEvent EventHandle[*GroupInfo] GroupLeaveEvent EventHandle[*GroupLeaveEvent] GroupMemberJoinEvent EventHandle[*MemberJoinGroupEvent] GroupMemberLeaveEvent EventHandle[*MemberLeaveGroupEvent] MemberCardUpdatedEvent EventHandle[*MemberCardUpdatedEvent] GroupNameUpdatedEvent EventHandle[*GroupNameUpdatedEvent] GroupMemberPermissionChangedEvent EventHandle[*MemberPermissionChangedEvent] GroupInvitedEvent EventHandle[*GroupInvitedRequest] UserWantJoinGroupEvent EventHandle[*UserJoinGroupRequest] NewFriendEvent EventHandle[*NewFriendEvent] NewFriendRequestEvent EventHandle[*NewFriendRequest] DisconnectedEvent EventHandle[*ClientDisconnectedEvent] GroupNotifyEvent EventHandle[INotifyEvent] FriendNotifyEvent EventHandle[INotifyEvent] MemberSpecialTitleUpdatedEvent EventHandle[*MemberSpecialTitleUpdatedEvent] GroupDigestEvent EventHandle[*GroupDigestEvent] OtherClientStatusChangedEvent EventHandle[*OtherClientStatusChangedEvent] OfflineFileEvent EventHandle[*OfflineFileEvent] GroupDisbandEvent EventHandle[*GroupDisbandEvent] DeleteFriendEvent EventHandle[*DeleteFriendEvent] // contains filtered or unexported fields }
func NewClientEmpty ¶
func NewClientEmpty() *QQClient
func NewClientMd5 ¶
func (*QQClient) AddGroupNoticeSimple ¶
AddGroupNoticeSimple 发群公告
func (*QQClient) AddGroupNoticeWithPic ¶
func (c *QQClient) AddGroupNoticeWithPic(groupCode int64, text string, pic []byte) (noticeId string, err error)
AddGroupNoticeWithPic 发群公告带图片
func (*QQClient) CheckUrlSafely ¶
func (c *QQClient) CheckUrlSafely(url string) UrlSecurityLevel
CheckUrlSafely 通过TX服务器检查URL安全性
func (*QQClient) ConnectionQualityTest ¶
func (c *QQClient) ConnectionQualityTest() *ConnectionQualityInfo
func (*QQClient) DelGroupNotice ¶
func (*QQClient) DeleteEssenceMessage ¶
DeleteEssenceMessage 移出群精华消息
func (*QQClient) DeleteFriend ¶
func (*QQClient) DeleteUnidirectionalFriend ¶
func (*QQClient) Device ¶
func (c *QQClient) Device() *DeviceInfo
func (*QQClient) DownloadForwardMessage ¶
func (c *QQClient) DownloadForwardMessage(resId string) *message.ForwardElement
func (*QQClient) FetchQRCode ¶
func (c *QQClient) FetchQRCode() (*QRCodeLoginResponse, error)
func (*QQClient) FetchQRCodeCustomSize ¶
func (c *QQClient) FetchQRCodeCustomSize(size, margin, ecLevel uint32) (*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) GetGroupNotice ¶
func (c *QQClient) GetGroupNotice(groupCode int64) (l []*GroupNoticeMessage, err error)
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) Login ¶
func (c *QQClient) Login() (*LoginResponse, error)
Login send login request
func (*QQClient) MarkGroupMessageReaded ¶
MarkGroupMessageReaded 标记群消息已读, 适当调用应该能减少风控
func (*QQClient) MarkPrivateMessageReaded ¶
func (*QQClient) NewForwardMessageBuilder ¶
func (c *QQClient) NewForwardMessageBuilder(groupCode int64) *ForwardMessageBuilder
func (*QQClient) OnServerUpdated ¶
func (c *QQClient) OnServerUpdated(f func(*QQClient, *ServerUpdatedEvent) bool)
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) SendGroupMessage ¶
func (c *QQClient) SendGroupMessage(groupCode int64, m *message.SendingMessage) *message.GroupMessage
SendGroupMessage 发送群消息
func (*QQClient) SendGroupMusicShare ¶
func (c *QQClient) SendGroupMusicShare(target int64, msg *message.MusicShareElement) (*message.GroupMessage, error)
SendGroupMusicShare 发送群聊音乐卡片
func (*QQClient) SendGroupPoke ¶
func (*QQClient) SendGroupSign ¶
SendGroupSign 发送群聊打卡消息
func (*QQClient) SendGroupTempMessage ¶
func (c *QQClient) SendGroupTempMessage(groupCode, target int64, m *message.SendingMessage) *message.TempMessage
func (*QQClient) SendGuildMusicShare ¶
func (c *QQClient) SendGuildMusicShare(guildID, channelID uint64, msg *message.MusicShareElement)
SendGuildMusicShare 发送频道音乐卡片
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) SubscribeEventHandler ¶
func (*QQClient) SyncSessions ¶
func (c *QQClient) SyncSessions() (*SessionSyncResponse, error)
SyncSessions 同步会话列表
func (*QQClient) TokenLogin ¶
func (*QQClient) UpdateProfile ¶
func (c *QQClient) UpdateProfile(profile ProfileDetailUpdate)
UpdateProfile 修改个人资料
func (*QQClient) UploadFile ¶
func (*QQClient) UploadImage ¶
func (c *QQClient) UploadImage(target message.Source, img io.ReadSeeker) (message.IMessageElement, error)
func (*QQClient) UploadShortVideo ¶
func (c *QQClient) UploadShortVideo(target message.Source, video, thumb io.ReadSeeker) (*message.ShortVideoElement, error)
UploadShortVideo 将视频和封面上传到服务器, 返回 message.ShortVideoElement 可直接发送
func (*QQClient) UploadVoice ¶
func (c *QQClient) UploadVoice(target message.Source, voice io.ReadSeeker) (*message.GroupVoiceElement, error)
UploadVoice 将语音数据使用群语音通道上传到服务器, 返回 message.GroupVoiceElement 可直接发送
func (*QQClient) WQGetCookiesAllC ¶
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 atomic.Uint64 PacketSent atomic.Uint64 PacketLost atomic.Uint64 MessageReceived atomic.Uint64 MessageSent atomic.Uint64 LastMessageTime atomic.Int64 DisconnectTimes atomic.Uint32 LostTimes atomic.Uint32 }
func (*Statistics) MarshalJSON ¶
func (m *Statistics) MarshalJSON() ([]byte, error)
MarshalJSON encodes the wrapped statistics into JSON.
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 = iota // 来自群聊 ConsultingSource // 来自QQ咨询 SearchSource // 来自查找 MovieSource // 来自QQ电影 HotChatSource // 来自热聊 SystemMessageSource // 来自验证消息 MultiChatSource // 来自多人聊天 DateSource // 来自约会 AddressBookSource // 来自通讯录 )
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 = iota + 1 Unknown Danger )
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
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
- guild_eventflow.go
- guild_msg.go
- http_api.go
- image.go
- log.go
- loginerror_string.go
- model_show.go
- multimsg.go
- network.go
- notify.go
- offline_file.go
- online_push.go
- packet.go
- private_msg.go
- ptt.go
- qidian.go
- recall.go
- richmsg.go
- security.go
- sign.go
- statistics.go
- sync.go
- system_msg.go
- tlv_decoders.go
- translate.go
- upload_file.go
- web.go