Documentation ¶
Index ¶
- func RegisterOnebotApiGRPCServiceServer(s *grpc.Server, srv OnebotAPiClientInterfaceGRPCServiceServer)
- type OnebotAPiClientInterfaceGRPCServiceClient
- type OnebotAPiClientInterfaceGRPCServiceServer
- type OnebotApiClient
- type OnebotApiClientStub
- func (cli *OnebotApiClientStub) CanSendImage() (*model.BoolYesOfResult, error)
- func (cli *OnebotApiClientStub) CanSendRecord() (*model.BoolYesOfResult, error)
- func (cli *OnebotApiClientStub) CheckUrlSafely(url string) (*model.CheckUrlSafelyResult, error)
- func (cli *OnebotApiClientStub) CleanCache() error
- func (cli *OnebotApiClientStub) CreateGroupFileFolder(groupId int64, name string, parentId string) error
- func (cli *OnebotApiClientStub) DeleteEssenceMsg(messageId int64) error
- func (cli *OnebotApiClientStub) DeleteFriend(userId int64) error
- func (cli *OnebotApiClientStub) DeleteGroupFile(groupId int64, fileId string, busid int32) error
- func (cli *OnebotApiClientStub) DeleteGroupFolder(groupId int64, folderId string) error
- func (cli *OnebotApiClientStub) DeleteMsg(id int64) error
- func (cli *OnebotApiClientStub) DeleteUnidirectionalFriend(userId int64) error
- func (cli *OnebotApiClientStub) DownloadFile(url string, threadCount int32, headers []string) (*model.DownloadFileResult, error)
- func (cli *OnebotApiClientStub) GetCookies(domain string) (*model.CookiesResult, error)
- func (cli *OnebotApiClientStub) GetCredentials() (*model.CredentialsResult, error)
- func (cli *OnebotApiClientStub) GetCsrfToken() (*model.CsrfTokenResult, error)
- func (cli *OnebotApiClientStub) GetEssenceMsgList(groupId int64) (*model.EssenceMsgListResult, error)
- func (cli *OnebotApiClientStub) GetForwardMsg(id int64) (*model.ForwardMessageDataResult, error)
- func (cli *OnebotApiClientStub) GetFriendList() (*model.FriendListResult, error)
- func (cli *OnebotApiClientStub) GetGroupAtAllRemain(groupId int64) (*model.GroupAtAllRemainResult, error)
- func (cli *OnebotApiClientStub) GetGroupFileSystemInfo(groupId int64) (*model.GroupFileSystemInfoResult, error)
- func (cli *OnebotApiClientStub) GetGroupFileUrl(groupId int64, fileId string, busid int32) (*model.FileUrlResult, error)
- func (cli *OnebotApiClientStub) GetGroupFilesByFolder(groupId int64, folderId string) (*model.GroupFilesResult, error)
- func (cli *OnebotApiClientStub) GetGroupHonorInfo(groupId int64, honorType string) (*model.GroupHonorInfoResult, error)
- func (cli *OnebotApiClientStub) GetGroupInfo(groupId int64, noCache bool) (*model.GroupInfoResult, error)
- func (cli *OnebotApiClientStub) GetGroupList(noCache bool) (*model.GroupListResult, error)
- func (cli *OnebotApiClientStub) GetGroupMemberInfo(groupId int64, userId int64, noCache bool) (*model.GroupMemberInfoResult, error)
- func (cli *OnebotApiClientStub) GetGroupMemberList(groupId int64, noCache bool) (*model.GroupMemberListResult, error)
- func (cli *OnebotApiClientStub) GetGroupMsgHistory(message_seq int64, groupId int64) (*model.MessagesResult, error)
- func (cli *OnebotApiClientStub) GetGroupNotice(groupId int64) (*model.GroupNoticeResult, error)
- func (cli *OnebotApiClientStub) GetGroupRootFiles(groupId int64) (*model.GroupFilesResult, error)
- func (cli *OnebotApiClientStub) GetGroupSystemMsg() (*model.GroupSystemMsgResult, error)
- func (cli *OnebotApiClientStub) GetImage(file string) (*model.ImageResult, error)
- func (cli *OnebotApiClientStub) GetLoginInfo() (*model.AccountResult, error)
- func (cli *OnebotApiClientStub) GetModelShow() (*model.ModelShowResult, error)
- func (cli *OnebotApiClientStub) GetMsg(id int64) (*model.MessageDataResult, error)
- func (cli *OnebotApiClientStub) GetOnlineClients() (*model.OnlineClientsResult, error)
- func (cli *OnebotApiClientStub) GetRecord(file string, outFormat string) (*model.RecordResult, error)
- func (cli *OnebotApiClientStub) GetStatus() (*model.StatusResult, error)
- func (cli *OnebotApiClientStub) GetStrangerInfo(userId int64, noCache bool) (*model.StrangerInfoResult, error)
- func (cli *OnebotApiClientStub) GetUnidirectionalFriendList() (*model.FriendListResult, error)
- func (cli *OnebotApiClientStub) GetVersionInfo() (*model.VersionInfoResult, error)
- func (cli *OnebotApiClientStub) HiddenGetWordSlices(content string) (*model.WordSlicesResult, error)
- func (cli *OnebotApiClientStub) HiddenHandleQuickOperation(ctx interface{}, operation interface{}) error
- func (cli *OnebotApiClientStub) MarkMsgAsRead(id int64) error
- func (cli *OnebotApiClientStub) OcrImage(image string) (*model.OcrImageResult, error)
- func (cli *OnebotApiClientStub) ReloadEventFilter(file string) error
- func (cli *OnebotApiClientStub) SendGroupForwardMsg(groupId int64, messages []*model.MessageSegment) (*model.SendForwardMessageDataResult, error)
- func (cli *OnebotApiClientStub) SendGroupMsg(msg *model.GroupMsg) (*model.SendMessageResult, error)
- func (cli *OnebotApiClientStub) SendGroupNotice(groupId int64, content string, image string) error
- func (cli *OnebotApiClientStub) SendGroupSign(groupId int64) error
- func (cli *OnebotApiClientStub) SendMsg(msg *model.MsgForSend) (*model.SendMessageResult, error)
- func (cli *OnebotApiClientStub) SendPrivateForwardMsg(userId int64, messages []*model.MessageSegment) (*model.SendForwardMessageDataResult, error)
- func (cli *OnebotApiClientStub) SendPrivateMsg(msg *model.PrivateMsg) (*model.SendMessageResult, error)
- func (cli *OnebotApiClientStub) SetEssenceMsg(messageId int64) error
- func (cli *OnebotApiClientStub) SetFriendAddRequest(flag string, approve bool, remark string) error
- func (cli *OnebotApiClientStub) SetGroupAddRequest(flag string, subType string, approve bool, reason string) error
- func (cli *OnebotApiClientStub) SetGroupAdmin(groupId int64, userId int64, enable bool) error
- func (cli *OnebotApiClientStub) SetGroupAnonymous(groupId int64, enable bool) error
- func (cli *OnebotApiClientStub) SetGroupAnonymousBan(groupId int64, anonymous *model.Anonymous, anonymousFlag string, ...) error
- func (cli *OnebotApiClientStub) SetGroupBan(groupId int64, userId int64, duration uint32) error
- func (cli *OnebotApiClientStub) SetGroupCard(groupId int64, userId int64, card string) error
- func (cli *OnebotApiClientStub) SetGroupKick(groupId int64, userId int64, rejectAddRequest bool) error
- func (cli *OnebotApiClientStub) SetGroupLeave(groupId int64, isDismiss bool) error
- func (cli *OnebotApiClientStub) SetGroupName(groupId int64, groupName string) error
- func (cli *OnebotApiClientStub) SetGroupPortrait(groupId int64, file string, cache int) error
- func (cli *OnebotApiClientStub) SetGroupSpecialTitle(groupId int64, userId int64, specialTitle string, duration uint32) error
- func (cli *OnebotApiClientStub) SetGroupWholeBan(groupId int64, enable bool) error
- func (cli *OnebotApiClientStub) SetModelShow(model string, modelshow string) error
- func (cli *OnebotApiClientStub) SetQQProfile(profile *model.QQProfile) error
- func (cli *OnebotApiClientStub) SetRestart(delay int32) error
- func (cli *OnebotApiClientStub) UploadGroupFile(groupId int64, _file string, name string, folder string) error
- func (cli *OnebotApiClientStub) UploadPrivateFile(userId int64, _file string, name string) error
- type OnebotApiGRPCPlugin
- type OnebotApiServerStub
- func (svc *OnebotApiServerStub) CanSendImage(ctx context.Context, in *emptypb.Empty) (*model.BoolYesOfResultGRPC, error)
- func (svc *OnebotApiServerStub) CanSendRecord(ctx context.Context, in *emptypb.Empty) (*model.BoolYesOfResultGRPC, error)
- func (svc *OnebotApiServerStub) CheckUrlSafely(ctx context.Context, in *wrapperspb.StringValue) (*model.CheckUrlSafelyResultGRPC, error)
- func (svc *OnebotApiServerStub) CleanCache(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) CreateGroupFileFolder(ctx context.Context, in *file.CreateGroupFileFolderRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) DeleteEssenceMsg(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) DeleteFriend(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) DeleteGroupFile(ctx context.Context, in *file.DeleteGroupFileRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) DeleteGroupFolder(ctx context.Context, in *file.DeleteGroupFolderRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) DeleteMsg(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) DeleteUnidirectionalFriend(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) DownloadFile(ctx context.Context, in *cqhttp.DownloadFileRequestGRPC) (*model.DownloadFileResultGRPC, error)
- func (svc *OnebotApiServerStub) GetCookies(ctx context.Context, in *wrapperspb.StringValue) (*model.CookiesResultGRPC, error)
- func (svc *OnebotApiServerStub) GetCredentials(ctx context.Context, in *emptypb.Empty) (*model.CredentialsResultGRPC, error)
- func (svc *OnebotApiServerStub) GetCsrfToken(ctx context.Context, in *emptypb.Empty) (*model.CsrfTokenResultGRPC, error)
- func (svc *OnebotApiServerStub) GetEssenceMsgList(ctx context.Context, in *wrapperspb.Int64Value) (*model.EssenceMsgListResultGRPC, error)
- func (svc *OnebotApiServerStub) GetForwardMsg(ctx context.Context, in *wrapperspb.Int64Value) (*model.ForwardMessageDataResultGRPC, error)
- func (svc *OnebotApiServerStub) GetFriendList(ctx context.Context, in *emptypb.Empty) (*model.FriendListResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupAtAllRemain(ctx context.Context, in *wrapperspb.Int64Value) (*model.GroupAtAllRemainResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupFileSystemInfo(ctx context.Context, in *wrapperspb.Int64Value) (*model.GroupFileSystemInfoResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupFileUrl(ctx context.Context, in *file.GetGroupFileUrlRequest) (*model.FileUrlResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupFilesByFolder(ctx context.Context, in *file.GroupFilesByFolderRequest) (*model.GroupFilesResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupHonorInfo(ctx context.Context, in *group.GetGroupHonorInfoRequest) (*model.GroupHonorInfoResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupInfo(ctx context.Context, in *group.GetGroupInfoRequest) (*model.GroupInfoResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupList(ctx context.Context, in *wrapperspb.BoolValue) (*model.GroupListResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupMemberInfo(ctx context.Context, in *group.GetGroupMemberInfoRequest) (*model.GroupMemberInfoResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupMemberList(ctx context.Context, in *group.GetGroupMemberListRequest) (*model.GroupMemberListResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupMsgHistory(ctx context.Context, in *message.GetGroupMsgHistoryRequest) (*model.MessagesResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupNotice(ctx context.Context, in *wrapperspb.Int64Value) (*model.GroupNoticeResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupRootFiles(ctx context.Context, in *wrapperspb.Int64Value) (*model.GroupFilesResultGRPC, error)
- func (svc *OnebotApiServerStub) GetGroupSystemMsg(ctx context.Context, in *emptypb.Empty) (*model.GroupSystemMsgResultGRPC, error)
- func (svc *OnebotApiServerStub) GetImage(ctx context.Context, in *wrapperspb.StringValue) (*model.ImageResultGRPC, error)
- func (svc *OnebotApiServerStub) GetLoginInfo(ctx context.Context, in *emptypb.Empty) (*model.AccountResultGRPC, error)
- func (svc *OnebotApiServerStub) GetModelShow(ctx context.Context, in *emptypb.Empty) (*model.ModelShowResultGRPC, error)
- func (svc *OnebotApiServerStub) GetMsg(ctx context.Context, in *wrapperspb.Int64Value) (*model.MessageDataResultGRPC, error)
- func (svc *OnebotApiServerStub) GetOnlineClients(ctx context.Context, in *emptypb.Empty) (*model.OnlineClientsResultGRPC, error)
- func (svc *OnebotApiServerStub) GetRecord(ctx context.Context, in *record.GetRecordRequest) (*model.RecordResultGRPC, error)
- func (svc *OnebotApiServerStub) GetStatus(ctx context.Context, in *emptypb.Empty) (*model.StatusResultGRPC, error)
- func (svc *OnebotApiServerStub) GetStrangerInfo(ctx context.Context, in *friend.GetStrangerInfoRequest) (*model.StrangerInfoResultGRPC, error)
- func (svc *OnebotApiServerStub) GetUnidirectionalFriendList(ctx context.Context, in *emptypb.Empty) (*model.FriendListResultGRPC, error)
- func (svc *OnebotApiServerStub) GetVersionInfo(ctx context.Context, in *emptypb.Empty) (*model.VersionInfoResultGRPC, error)
- func (svc *OnebotApiServerStub) HiddenGetWordSlices(ctx context.Context, in *wrapperspb.StringValue) (*model.WordSlicesResultGRPC, error)
- func (svc *OnebotApiServerStub) HiddenHandleQuickOperation(ctx context.Context, in *cqhttp.HiddenHandleQuickOperationRequestGRPC) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) MarkMsgAsRead(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) OcrImage(ctx context.Context, in *wrapperspb.StringValue) (*model.OcrImageResultGRPC, error)
- func (svc *OnebotApiServerStub) ReloadEventFilter(ctx context.Context, in *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SendGroupForwardMsg(ctx context.Context, in *message.SendGroupForwardMsgRequest) (*model.SendForwardMessageDataResultGRPC, error)
- func (svc *OnebotApiServerStub) SendGroupMsg(ctx context.Context, in *model.GroupMsgGRPC) (*model.SendMessageResultGRPC, error)
- func (svc *OnebotApiServerStub) SendGroupNotice(ctx context.Context, in *groupopt.SendGroupNoticeRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SendGroupSign(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SendMsg(ctx context.Context, in *model.MsgForSendGRPC) (*model.SendMessageResultGRPC, error)
- func (svc *OnebotApiServerStub) SendPrivateForwardMsg(ctx context.Context, in *message.SendPrivateForwardMsgGRPC) (*model.SendForwardMessageDataResultGRPC, error)
- func (svc *OnebotApiServerStub) SendPrivateMsg(ctx context.Context, in *model.PrivateMsgGRPC) (*model.SendMessageResultGRPC, error)
- func (svc *OnebotApiServerStub) SetEssenceMsg(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetFriendAddRequest(ctx context.Context, in *request.SetFriendAddRequestRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupAddRequest(ctx context.Context, in *request.SetGroupAddRequestRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupAdmin(ctx context.Context, in *groupopt.SetGroupAdminRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupAnonymous(ctx context.Context, in *groupopt.SetGroupAnonymousRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupAnonymousBan(ctx context.Context, in *groupopt.SetGroupAnonymousBanRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupBan(ctx context.Context, in *groupopt.SetGroupBanRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupCard(ctx context.Context, in *groupopt.SetGroupCardRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupKick(ctx context.Context, in *groupopt.SetGroupKickRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupLeave(ctx context.Context, in *groupopt.SetGroupLeaveRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupName(ctx context.Context, in *groupopt.SetGroupNameRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupPortrait(ctx context.Context, in *groupopt.SetGroupPortraitRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupSpecialTitle(ctx context.Context, in *groupopt.SetGroupSpecialTitleRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetGroupWholeBan(ctx context.Context, in *groupopt.SetGroupWholeBanequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetModelShow(ctx context.Context, in *account.SetModelShowRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetQQProfile(ctx context.Context, in *model.QQProfileGRPC) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) SetRestart(ctx context.Context, in *wrapperspb.Int32Value) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) UploadGroupFile(ctx context.Context, in *file.UploadGroupFileRequest) (*emptypb.Empty, error)
- func (svc *OnebotApiServerStub) UploadPrivateFile(ctx context.Context, in *file.UploadPrivateFileRequest) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterOnebotApiGRPCServiceServer ¶
func RegisterOnebotApiGRPCServiceServer(s *grpc.Server, srv OnebotAPiClientInterfaceGRPCServiceServer)
Types ¶
type OnebotAPiClientInterfaceGRPCServiceClient ¶
type OnebotAPiClientInterfaceGRPCServiceClient interface { account.OnebotApiAccountGRPCServiceClient cqhttp.OnebotApiCqhttpGRPCServiceClient file.OnebotApiFileGRPCServiceClient friend.OnebotApiFriendGRPCServiceClient friendopt.OnebotApiFriendOptGRPCServiceClient group.OnebotApiGroupGRPCServiceClient groupopt.OnebotApiGroupOptGRPCServiceClient image.OnebotApiImageGRPCServiceClient message.OnebotApiMessageGRPCServiceClient record.OnebotApiRecordGRPCServiceClient request.OnebotApiRequestGRPCServiceClient }
func NewOnebotAPiClientInterfaceGRPCServiceClient ¶
func NewOnebotAPiClientInterfaceGRPCServiceClient(c *grpc.ClientConn) OnebotAPiClientInterfaceGRPCServiceClient
type OnebotAPiClientInterfaceGRPCServiceServer ¶
type OnebotAPiClientInterfaceGRPCServiceServer interface { account.OnebotApiAccountGRPCServiceServer cqhttp.OnebotApiCqhttpGRPCServiceServer file.OnebotApiFileGRPCServiceServer friend.OnebotApiFriendGRPCServiceServer friendopt.OnebotApiFriendOptGRPCServiceServer group.OnebotApiGroupGRPCServiceServer groupopt.OnebotApiGroupOptGRPCServiceServer image.OnebotApiImageGRPCServiceServer message.OnebotApiMessageGRPCServiceServer record.OnebotApiRecordGRPCServiceServer request.OnebotApiRequestGRPCServiceServer }
type OnebotApiClient ¶
type OnebotApiClient struct{}
type OnebotApiClientStub ¶
type OnebotApiClientStub struct {
Client OnebotAPiClientInterfaceGRPCServiceClient
}
业务接口的实现,通过gRPC客户端转发请求给插件进程
func (*OnebotApiClientStub) CanSendImage ¶
func (cli *OnebotApiClientStub) CanSendImage() (*model.BoolYesOfResult, error)
检查是否可以发送图片 can_send_image
func (*OnebotApiClientStub) CanSendRecord ¶
func (cli *OnebotApiClientStub) CanSendRecord() (*model.BoolYesOfResult, error)
检查是否可以发送语音 can_send_record
func (*OnebotApiClientStub) CheckUrlSafely ¶
func (cli *OnebotApiClientStub) CheckUrlSafely(url string) (*model.CheckUrlSafelyResult, error)
检查链接安全性 check_url_safely url 链接
func (*OnebotApiClientStub) CleanCache ¶
func (cli *OnebotApiClientStub) CleanCache() error
清理缓存 clean_cache
func (*OnebotApiClientStub) CreateGroupFileFolder ¶
func (cli *OnebotApiClientStub) CreateGroupFileFolder(groupId int64, name string, parentId string) error
创建群文件目录 create_group_file_folder groupId 群号 name 目录名 parentId 父目录ID
func (*OnebotApiClientStub) DeleteEssenceMsg ¶
func (cli *OnebotApiClientStub) DeleteEssenceMsg(messageId int64) error
删除精华消息 delete_essence_msg message_id 消息 ID
func (*OnebotApiClientStub) DeleteFriend ¶
func (cli *OnebotApiClientStub) DeleteFriend(userId int64) error
删除好友 delete_friend user_id: 对方 QQ 号
func (*OnebotApiClientStub) DeleteGroupFile ¶
func (cli *OnebotApiClientStub) DeleteGroupFile(groupId int64, fileId string, busid int32) error
删除群文件 delete_group_file groupId 群号 file_id 文件ID 参考 File 对象 busid 文件类型 参考 File 对象
func (*OnebotApiClientStub) DeleteGroupFolder ¶
func (cli *OnebotApiClientStub) DeleteGroupFolder(groupId int64, folderId string) error
删除群文件目录 delete_group_folder groupId 群号 folder_id 文件夹ID 参考 Folder 对象
func (*OnebotApiClientStub) DeleteMsg ¶
func (cli *OnebotApiClientStub) DeleteMsg(id int64) error
撤回消息 delete_msg
func (*OnebotApiClientStub) DeleteUnidirectionalFriend ¶
func (cli *OnebotApiClientStub) DeleteUnidirectionalFriend(userId int64) error
删除单向好友 delete_unidirectional_friend user_id: 对方 QQ 号
func (*OnebotApiClientStub) DownloadFile ¶
func (cli *OnebotApiClientStub) DownloadFile(url string, threadCount int32, headers []string) (*model.DownloadFileResult, error)
下载文件到缓存目录 download_file url 文件链接 thread_count 线程数 headers 请求头
func (*OnebotApiClientStub) GetCookies ¶
func (cli *OnebotApiClientStub) GetCookies(domain string) (*model.CookiesResult, error)
获取 Cookies get_cookies domain 指定域名
func (*OnebotApiClientStub) GetCredentials ¶
func (cli *OnebotApiClientStub) GetCredentials() (*model.CredentialsResult, error)
获取 QQ 相关接口凭证 get_credentials
func (*OnebotApiClientStub) GetCsrfToken ¶
func (cli *OnebotApiClientStub) GetCsrfToken() (*model.CsrfTokenResult, error)
获取 CSRF Token get_csrf_token
func (*OnebotApiClientStub) GetEssenceMsgList ¶
func (cli *OnebotApiClientStub) GetEssenceMsgList(groupId int64) (*model.EssenceMsgListResult, error)
获取精华消息列表 get_essence_msg_list group_id: 群号
func (*OnebotApiClientStub) GetForwardMsg ¶
func (cli *OnebotApiClientStub) GetForwardMsg(id int64) (*model.ForwardMessageDataResult, error)
获取合并转发消息 get_forward_msg
func (*OnebotApiClientStub) GetFriendList ¶
func (cli *OnebotApiClientStub) GetFriendList() (*model.FriendListResult, error)
获取好友列表 get_friend_list
func (*OnebotApiClientStub) GetGroupAtAllRemain ¶
func (cli *OnebotApiClientStub) GetGroupAtAllRemain(groupId int64) (*model.GroupAtAllRemainResult, error)
获取群 @全体成员 剩余次数 get_group_at_all_remain group_id: 群号
func (*OnebotApiClientStub) GetGroupFileSystemInfo ¶
func (cli *OnebotApiClientStub) GetGroupFileSystemInfo(groupId int64) (*model.GroupFileSystemInfoResult, error)
获取群文件系统信息 get_group_file_system_info groupId 群号
func (*OnebotApiClientStub) GetGroupFileUrl ¶
func (cli *OnebotApiClientStub) GetGroupFileUrl(groupId int64, fileId string, busid int32) (*model.FileUrlResult, error)
获取群文件资源链接 get_group_file_url groupId 群号 file_id 文件ID 参考 File 对象 busid 文件类型 参考 File 对象
func (*OnebotApiClientStub) GetGroupFilesByFolder ¶
func (cli *OnebotApiClientStub) GetGroupFilesByFolder(groupId int64, folderId string) (*model.GroupFilesResult, error)
get_group_files_by_folder 获取群文件列表 groupId 群号 folder_id 文件夹ID
func (*OnebotApiClientStub) GetGroupHonorInfo ¶
func (cli *OnebotApiClientStub) GetGroupHonorInfo(groupId int64, honorType string) (*model.GroupHonorInfoResult, error)
获取群荣誉信息 get_group_honor_info group_id: 群号 type: 群荣誉类型,目前支持 talkative(群聊之火)、performer(群聊炽焰)、legend(群聊传说)、strong_newbie(群聊新星)、emotion(群表情之火)
func (*OnebotApiClientStub) GetGroupInfo ¶
func (cli *OnebotApiClientStub) GetGroupInfo(groupId int64, noCache bool) (*model.GroupInfoResult, error)
获取群信息 get_group_info group_id: 群号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiClientStub) GetGroupList ¶
func (cli *OnebotApiClientStub) GetGroupList(noCache bool) (*model.GroupListResult, error)
获取群列表 get_group_list no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiClientStub) GetGroupMemberInfo ¶
func (cli *OnebotApiClientStub) GetGroupMemberInfo(groupId int64, userId int64, noCache bool) (*model.GroupMemberInfoResult, error)
获取群成员信息 get_group_member_info group_id: 群号 user_id: QQ 号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiClientStub) GetGroupMemberList ¶
func (cli *OnebotApiClientStub) GetGroupMemberList(groupId int64, noCache bool) (*model.GroupMemberListResult, error)
获取群成员列表 get_group_member_list group_id: 群号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiClientStub) GetGroupMsgHistory ¶
func (cli *OnebotApiClientStub) GetGroupMsgHistory(message_seq int64, groupId int64) (*model.MessagesResult, error)
获取群消息历史记录 get_group_msg_history
func (*OnebotApiClientStub) GetGroupNotice ¶
func (cli *OnebotApiClientStub) GetGroupNotice(groupId int64) (*model.GroupNoticeResult, error)
获取群公告 _get_group_notice groupId 群号
func (*OnebotApiClientStub) GetGroupRootFiles ¶
func (cli *OnebotApiClientStub) GetGroupRootFiles(groupId int64) (*model.GroupFilesResult, error)
获取群根目录文件列表 get_group_root_files groupId 群号
func (*OnebotApiClientStub) GetGroupSystemMsg ¶
func (cli *OnebotApiClientStub) GetGroupSystemMsg() (*model.GroupSystemMsgResult, error)
获取群系统消息 get_group_system_msg
func (*OnebotApiClientStub) GetImage ¶
func (cli *OnebotApiClientStub) GetImage(file string) (*model.ImageResult, error)
获取图片 get_image
func (*OnebotApiClientStub) GetLoginInfo ¶
func (cli *OnebotApiClientStub) GetLoginInfo() (*model.AccountResult, error)
获取登录号信息 get_login_info
func (*OnebotApiClientStub) GetModelShow ¶
func (cli *OnebotApiClientStub) GetModelShow() (*model.ModelShowResult, error)
获取在线机型 _get_model_show
func (*OnebotApiClientStub) GetMsg ¶
func (cli *OnebotApiClientStub) GetMsg(id int64) (*model.MessageDataResult, error)
获取消息 get_msg
func (*OnebotApiClientStub) GetOnlineClients ¶
func (cli *OnebotApiClientStub) GetOnlineClients() (*model.OnlineClientsResult, error)
获取在线客户端列表 get_online_clients
func (*OnebotApiClientStub) GetRecord ¶
func (cli *OnebotApiClientStub) GetRecord(file string, outFormat string) (*model.RecordResult, error)
获取语音 get_record
func (*OnebotApiClientStub) GetStatus ¶
func (cli *OnebotApiClientStub) GetStatus() (*model.StatusResult, error)
获取状态 get_status
func (*OnebotApiClientStub) GetStrangerInfo ¶
func (cli *OnebotApiClientStub) GetStrangerInfo(userId int64, noCache bool) (*model.StrangerInfoResult, error)
获取陌生人信息 get_stranger_info user_id: 对方 QQ 号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiClientStub) GetUnidirectionalFriendList ¶
func (cli *OnebotApiClientStub) GetUnidirectionalFriendList() (*model.FriendListResult, error)
获取单向好友列表 get_unidirectional_friend_list
func (*OnebotApiClientStub) GetVersionInfo ¶
func (cli *OnebotApiClientStub) GetVersionInfo() (*model.VersionInfoResult, error)
获取版本信息 get_version_info
func (*OnebotApiClientStub) HiddenGetWordSlices ¶
func (cli *OnebotApiClientStub) HiddenGetWordSlices(content string) (*model.WordSlicesResult, error)
获取中文分词 ( 隐藏 API ) .get_word_slices content 内容
func (*OnebotApiClientStub) HiddenHandleQuickOperation ¶
func (cli *OnebotApiClientStub) HiddenHandleQuickOperation(ctx interface{}, operation interface{}) error
对事件执行快速操作 ( 隐藏 API ) .handle_quick_operation context 事件上下文 operation 操作
func (*OnebotApiClientStub) MarkMsgAsRead ¶
func (cli *OnebotApiClientStub) MarkMsgAsRead(id int64) error
标记消息已读 mark_msg_as_read
func (*OnebotApiClientStub) OcrImage ¶
func (cli *OnebotApiClientStub) OcrImage(image string) (*model.OcrImageResult, error)
图片ORC识别 ocr_image
func (*OnebotApiClientStub) ReloadEventFilter ¶
func (cli *OnebotApiClientStub) ReloadEventFilter(file string) error
重载事件过滤器 reload_event_filter file 事件过滤器文件路径
func (*OnebotApiClientStub) SendGroupForwardMsg ¶
func (cli *OnebotApiClientStub) SendGroupForwardMsg(groupId int64, messages []*model.MessageSegment) (*model.SendForwardMessageDataResult, error)
发送合并转发 ( 群聊 ) send_group_forward_msg
func (*OnebotApiClientStub) SendGroupMsg ¶
func (cli *OnebotApiClientStub) SendGroupMsg(msg *model.GroupMsg) (*model.SendMessageResult, error)
发送群消息 send_group_msg msg 消息
func (*OnebotApiClientStub) SendGroupNotice ¶
func (cli *OnebotApiClientStub) SendGroupNotice(groupId int64, content string, image string) error
发送群公告 _send_group_notice groupId 群号 content 公告内容 image 图片文件路径(可选)
func (*OnebotApiClientStub) SendGroupSign ¶
func (cli *OnebotApiClientStub) SendGroupSign(groupId int64) error
发送群签到 send_group_sign groupId 群号
func (*OnebotApiClientStub) SendMsg ¶
func (cli *OnebotApiClientStub) SendMsg(msg *model.MsgForSend) (*model.SendMessageResult, error)
发送消息
func (*OnebotApiClientStub) SendPrivateForwardMsg ¶
func (cli *OnebotApiClientStub) SendPrivateForwardMsg(userId int64, messages []*model.MessageSegment) (*model.SendForwardMessageDataResult, error)
发送合并转发 ( 好友 ) send_private_forward_msg
func (*OnebotApiClientStub) SendPrivateMsg ¶
func (cli *OnebotApiClientStub) SendPrivateMsg(msg *model.PrivateMsg) (*model.SendMessageResult, error)
发送私信 send_private_msg msg 消息
func (*OnebotApiClientStub) SetEssenceMsg ¶
func (cli *OnebotApiClientStub) SetEssenceMsg(messageId int64) error
设置精华消息 set_essence_msg message_id 消息 ID
func (*OnebotApiClientStub) SetFriendAddRequest ¶
func (cli *OnebotApiClientStub) SetFriendAddRequest(flag string, approve bool, remark string) error
处理加好友请求 set_friend_add_request flag: 加好友请求的 flag(需从上报的数据中获得) approve: 是否同意请求 remark: 添加后的好友备注(仅在同意时有效)
func (*OnebotApiClientStub) SetGroupAddRequest ¶
func (cli *OnebotApiClientStub) SetGroupAddRequest(flag string, subType string, approve bool, reason string) error
处理加群请求/邀请 set_group_add_request flag: 加群请求的 flag(需从上报的数据中获得) sub_type: add 或 invite,请求类型(需要和上报消息中的 sub_type 字段相符) approve: 是否同意请求/邀请 reason: 拒绝理由(仅在拒绝时有效)
func (*OnebotApiClientStub) SetGroupAdmin ¶
func (cli *OnebotApiClientStub) SetGroupAdmin(groupId int64, userId int64, enable bool) error
set_group_admin 设置群管理员 groupId 群号 userId QQ 号 enable true 为设置,false 为取消
func (*OnebotApiClientStub) SetGroupAnonymous ¶
func (cli *OnebotApiClientStub) SetGroupAnonymous(groupId int64, enable bool) error
设置群匿名 set_group_anonymous groupId 群号 enable 是否允许匿名聊天
func (*OnebotApiClientStub) SetGroupAnonymousBan ¶
func (cli *OnebotApiClientStub) SetGroupAnonymousBan(groupId int64, anonymous *model.Anonymous, anonymousFlag string, duration uint32) error
禁言群匿名成员 set_group_anonymous_ban groupId 群号 anonymous 可选, 要禁言的匿名用户对象(群消息上报的 anonymous 字段) anonymousFlag 可选, 要禁言的匿名用户的 flag(需从群消息上报的数据中获得) 上面的 anonymous 和 anonymous_flag 两者任选其一传入即可, 若都传入, 则使用 anonymous。 duration 禁言时长,单位秒,不能超过 30 天
func (*OnebotApiClientStub) SetGroupBan ¶
func (cli *OnebotApiClientStub) SetGroupBan(groupId int64, userId int64, duration uint32) error
禁言群成员 set_group_ban groupId 群号 userId QQ 号 duration 禁言时长,单位秒,0 表示取消禁言
func (*OnebotApiClientStub) SetGroupCard ¶
func (cli *OnebotApiClientStub) SetGroupCard(groupId int64, userId int64, card string) error
设置群名片 set_group_card groupId 群号 userId QQ 号 card 群名片内容,不填或空字符串表示删除群名片
func (*OnebotApiClientStub) SetGroupKick ¶
func (cli *OnebotApiClientStub) SetGroupKick(groupId int64, userId int64, rejectAddRequest bool) error
群组踢人 set_group_kick groupId 群号 userId QQ 号 rejectAddRequest 是否拒绝此人的加群请求
func (*OnebotApiClientStub) SetGroupLeave ¶
func (cli *OnebotApiClientStub) SetGroupLeave(groupId int64, isDismiss bool) error
退出群组 set_group_leave groupId 群号 isDismiss 是否解散,如果登录号是群主,则仅在此项为 true 时能够解散
func (*OnebotApiClientStub) SetGroupName ¶
func (cli *OnebotApiClientStub) SetGroupName(groupId int64, groupName string) error
设置群名 set_group_name groupId 群号
func (*OnebotApiClientStub) SetGroupPortrait ¶
func (cli *OnebotApiClientStub) SetGroupPortrait(groupId int64, file string, cache int) error
设置群头像 set_group_portrait groupId 群号 file 图片文件路径 cache 缓存时间
func (*OnebotApiClientStub) SetGroupSpecialTitle ¶
func (cli *OnebotApiClientStub) SetGroupSpecialTitle(groupId int64, userId int64, specialTitle string, duration uint32) error
设置群头衔 set_group_special_title groupId 群号 userId QQ 号 specialTitle 头衔,不填或空字符串表示删除群头衔 duration 专属头衔有效期, 单位秒, -1 表示永久, 不过此项似乎没有效果, 可能是只有某些特殊的时间长度有效, 有待测试
func (*OnebotApiClientStub) SetGroupWholeBan ¶
func (cli *OnebotApiClientStub) SetGroupWholeBan(groupId int64, enable bool) error
设置全群禁言 set_group_whole_ban groupId 群号 enable 是否禁言
func (*OnebotApiClientStub) SetModelShow ¶
func (cli *OnebotApiClientStub) SetModelShow(model string, modelshow string) error
设置在线机型 _set_model_show model: 机型 modelshow: 机型展示
func (*OnebotApiClientStub) SetQQProfile ¶
func (cli *OnebotApiClientStub) SetQQProfile(profile *model.QQProfile) error
设置登录号资料 set_login_info
func (*OnebotApiClientStub) SetRestart ¶
func (cli *OnebotApiClientStub) SetRestart(delay int32) error
重启 Go-CqHttp set_restart delay 要延迟的毫秒数, 如果默认情况下无法重启, 可以尝试设置延迟为 2000 左右
func (*OnebotApiClientStub) UploadGroupFile ¶
func (cli *OnebotApiClientStub) UploadGroupFile(groupId int64, _file string, name string, folder string) error
上传群文件 upload_group_file groupId 群号 file 文件路径 name 文件名 folder 群文件目录ID
func (*OnebotApiClientStub) UploadPrivateFile ¶
func (cli *OnebotApiClientStub) UploadPrivateFile(userId int64, _file string, name string) error
上传好友文件 upload_private_file userId 用户ID file 文件路径 name 文件名
type OnebotApiGRPCPlugin ¶
type OnebotApiGRPCPlugin struct { // 需要嵌入插件接口 plugin.Plugin // 具体实现,仅当业务接口实现基于Go时该字段有用 Impl api.OnebotApiClientInterface }
func (*OnebotApiGRPCPlugin) GRPCClient ¶
func (p *OnebotApiGRPCPlugin) GRPCClient( ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn, ) (interface{}, error)
插件实现GRPC的接口
func (*OnebotApiGRPCPlugin) GRPCServer ¶
func (p *OnebotApiGRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
插件实现GRPC的接口
type OnebotApiServerStub ¶
type OnebotApiServerStub struct { plugin.Plugin // 具体实现,仅当业务接口实现基于Go时该字段有用 Impl api.OnebotApiClientInterface }
func (*OnebotApiServerStub) CanSendImage ¶
func (svc *OnebotApiServerStub) CanSendImage(ctx context.Context, in *emptypb.Empty) (*model.BoolYesOfResultGRPC, error)
检查是否可以发送图片 can_send_image
func (*OnebotApiServerStub) CanSendRecord ¶
func (svc *OnebotApiServerStub) CanSendRecord(ctx context.Context, in *emptypb.Empty) (*model.BoolYesOfResultGRPC, error)
检查是否可以发送语音 can_send_record
func (*OnebotApiServerStub) CheckUrlSafely ¶
func (svc *OnebotApiServerStub) CheckUrlSafely(ctx context.Context, in *wrapperspb.StringValue) (*model.CheckUrlSafelyResultGRPC, error)
检查链接安全性 check_url_safely url 链接
func (*OnebotApiServerStub) CleanCache ¶
func (svc *OnebotApiServerStub) CleanCache(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)
清理缓存 clean_cache
func (*OnebotApiServerStub) CreateGroupFileFolder ¶
func (svc *OnebotApiServerStub) CreateGroupFileFolder(ctx context.Context, in *file.CreateGroupFileFolderRequest) (*emptypb.Empty, error)
创建群文件目录 create_group_file_folder groupId 群号 name 目录名 parentId 父目录ID CreateGroupFileFolder(groupId int64, name string, parentId string) error
func (*OnebotApiServerStub) DeleteEssenceMsg ¶
func (svc *OnebotApiServerStub) DeleteEssenceMsg(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
删除精华消息 delete_essence_msg message_id 消息 ID
func (*OnebotApiServerStub) DeleteFriend ¶
func (svc *OnebotApiServerStub) DeleteFriend(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
删除好友 delete_friend user_id: int64 对方 QQ 号
func (*OnebotApiServerStub) DeleteGroupFile ¶
func (svc *OnebotApiServerStub) DeleteGroupFile(ctx context.Context, in *file.DeleteGroupFileRequest) (*emptypb.Empty, error)
删除群文件 delete_group_file groupId 群号 file_id 文件ID 参考 File 对象 busid 文件类型 参考 File 对象 DeleteGroupFile(groupId int64, fileId string, busid int32) error
func (*OnebotApiServerStub) DeleteGroupFolder ¶
func (svc *OnebotApiServerStub) DeleteGroupFolder(ctx context.Context, in *file.DeleteGroupFolderRequest) (*emptypb.Empty, error)
删除群文件目录 delete_group_folder groupId 群号 folder_id 文件夹ID 参考 Folder 对象 DeleteGroupFolder(groupId int64, folderId string) error
func (*OnebotApiServerStub) DeleteMsg ¶
func (svc *OnebotApiServerStub) DeleteMsg(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
撤回消息 delete_msg
func (*OnebotApiServerStub) DeleteUnidirectionalFriend ¶
func (svc *OnebotApiServerStub) DeleteUnidirectionalFriend(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
删除单向好友 delete_unidirectional_friend user_id: int64 对方 QQ 号
func (*OnebotApiServerStub) DownloadFile ¶
func (svc *OnebotApiServerStub) DownloadFile(ctx context.Context, in *cqhttp.DownloadFileRequestGRPC) (*model.DownloadFileResultGRPC, error)
下载文件到缓存目录 download_file url 文件链接 thread_count 线程数 headers 请求头
func (*OnebotApiServerStub) GetCookies ¶
func (svc *OnebotApiServerStub) GetCookies(ctx context.Context, in *wrapperspb.StringValue) (*model.CookiesResultGRPC, error)
获取 Cookies get_cookies domain 指定域名
func (*OnebotApiServerStub) GetCredentials ¶
func (svc *OnebotApiServerStub) GetCredentials(ctx context.Context, in *emptypb.Empty) (*model.CredentialsResultGRPC, error)
获取 QQ 相关接口凭证 get_credentials
func (*OnebotApiServerStub) GetCsrfToken ¶
func (svc *OnebotApiServerStub) GetCsrfToken(ctx context.Context, in *emptypb.Empty) (*model.CsrfTokenResultGRPC, error)
get_csrf_token
func (*OnebotApiServerStub) GetEssenceMsgList ¶
func (svc *OnebotApiServerStub) GetEssenceMsgList(ctx context.Context, in *wrapperspb.Int64Value) (*model.EssenceMsgListResultGRPC, error)
获取精华消息列表 get_essence_msg_list group_id: 群号
func (*OnebotApiServerStub) GetForwardMsg ¶
func (svc *OnebotApiServerStub) GetForwardMsg(ctx context.Context, in *wrapperspb.Int64Value) (*model.ForwardMessageDataResultGRPC, error)
获取合并转发消息 get_forward_msg
func (*OnebotApiServerStub) GetFriendList ¶
func (svc *OnebotApiServerStub) GetFriendList(ctx context.Context, in *emptypb.Empty) (*model.FriendListResultGRPC, error)
获取好友列表 get_friend_list
func (*OnebotApiServerStub) GetGroupAtAllRemain ¶
func (svc *OnebotApiServerStub) GetGroupAtAllRemain(ctx context.Context, in *wrapperspb.Int64Value) (*model.GroupAtAllRemainResultGRPC, error)
获取群 @全体成员 剩余次数 get_group_at_all_remain group_id: 群号
func (*OnebotApiServerStub) GetGroupFileSystemInfo ¶
func (svc *OnebotApiServerStub) GetGroupFileSystemInfo(ctx context.Context, in *wrapperspb.Int64Value) (*model.GroupFileSystemInfoResultGRPC, error)
获取群文件系统信息 get_group_file_system_info groupId 群号 GetGroupFileSystemInfo(groupId int64) (*model.GroupFileSystemInfoResult, error)
func (*OnebotApiServerStub) GetGroupFileUrl ¶
func (svc *OnebotApiServerStub) GetGroupFileUrl(ctx context.Context, in *file.GetGroupFileUrlRequest) (*model.FileUrlResultGRPC, error)
获取群文件资源链接 get_group_file_url groupId 群号 file_id 文件ID 参考 File 对象 busid 文件类型 参考 File 对象 GetGroupFileUrl(groupId int64, fileId string, busid int32) (*model.FileUrlResult, error)
func (*OnebotApiServerStub) GetGroupFilesByFolder ¶
func (svc *OnebotApiServerStub) GetGroupFilesByFolder(ctx context.Context, in *file.GroupFilesByFolderRequest) (*model.GroupFilesResultGRPC, error)
get_group_files_by_folder 获取群文件列表 groupId 群号 folder_id 文件夹ID GetGroupFilesByFolder(groupId int64, folderId string) (*model.GroupFilesResult, error)
func (*OnebotApiServerStub) GetGroupHonorInfo ¶
func (svc *OnebotApiServerStub) GetGroupHonorInfo(ctx context.Context, in *group.GetGroupHonorInfoRequest) (*model.GroupHonorInfoResultGRPC, error)
获取群荣誉信息 get_group_honor_info group_id: 群号 type: 群荣誉类型,目前支持 talkative(群聊之火)、performer(群聊炽焰)、legend(群聊传说)、strong_newbie(群聊新星)、emotion(群表情之火)
func (*OnebotApiServerStub) GetGroupInfo ¶
func (svc *OnebotApiServerStub) GetGroupInfo(ctx context.Context, in *group.GetGroupInfoRequest) (*model.GroupInfoResultGRPC, error)
获取群信息 get_group_info group_id: 群号 no_cache: 是否使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiServerStub) GetGroupList ¶
func (svc *OnebotApiServerStub) GetGroupList(ctx context.Context, in *wrapperspb.BoolValue) (*model.GroupListResultGRPC, error)
获取群列表 get_group_list no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiServerStub) GetGroupMemberInfo ¶
func (svc *OnebotApiServerStub) GetGroupMemberInfo(ctx context.Context, in *group.GetGroupMemberInfoRequest) (*model.GroupMemberInfoResultGRPC, error)
获取群成员信息 get_group_member_info group_id: 群号 user_id: QQ 号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiServerStub) GetGroupMemberList ¶
func (svc *OnebotApiServerStub) GetGroupMemberList(ctx context.Context, in *group.GetGroupMemberListRequest) (*model.GroupMemberListResultGRPC, error)
获取群成员列表 get_group_member_list group_id: 群号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiServerStub) GetGroupMsgHistory ¶
func (svc *OnebotApiServerStub) GetGroupMsgHistory(ctx context.Context, in *message.GetGroupMsgHistoryRequest) (*model.MessagesResultGRPC, error)
获取群消息历史记录 get_group_msg_history
func (*OnebotApiServerStub) GetGroupNotice ¶
func (svc *OnebotApiServerStub) GetGroupNotice(ctx context.Context, in *wrapperspb.Int64Value) (*model.GroupNoticeResultGRPC, error)
获取群公告 _get_group_notice groupId 群号
func (*OnebotApiServerStub) GetGroupRootFiles ¶
func (svc *OnebotApiServerStub) GetGroupRootFiles(ctx context.Context, in *wrapperspb.Int64Value) (*model.GroupFilesResultGRPC, error)
获取群根目录文件列表 get_group_root_files groupId 群号 GetGroupRootFiles(groupId int64) (*model.GroupFilesResult, error)
func (*OnebotApiServerStub) GetGroupSystemMsg ¶
func (svc *OnebotApiServerStub) GetGroupSystemMsg(ctx context.Context, in *emptypb.Empty) (*model.GroupSystemMsgResultGRPC, error)
获取群系统消息 get_group_system_msg
func (*OnebotApiServerStub) GetImage ¶
func (svc *OnebotApiServerStub) GetImage(ctx context.Context, in *wrapperspb.StringValue) (*model.ImageResultGRPC, error)
获取图片 get_image
func (*OnebotApiServerStub) GetLoginInfo ¶
func (svc *OnebotApiServerStub) GetLoginInfo(ctx context.Context, in *emptypb.Empty) (*model.AccountResultGRPC, error)
func (*OnebotApiServerStub) GetModelShow ¶
func (svc *OnebotApiServerStub) GetModelShow(ctx context.Context, in *emptypb.Empty) (*model.ModelShowResultGRPC, error)
func (*OnebotApiServerStub) GetMsg ¶
func (svc *OnebotApiServerStub) GetMsg(ctx context.Context, in *wrapperspb.Int64Value) (*model.MessageDataResultGRPC, error)
获取消息 get_msg
func (*OnebotApiServerStub) GetOnlineClients ¶
func (svc *OnebotApiServerStub) GetOnlineClients(ctx context.Context, in *emptypb.Empty) (*model.OnlineClientsResultGRPC, error)
func (*OnebotApiServerStub) GetRecord ¶
func (svc *OnebotApiServerStub) GetRecord(ctx context.Context, in *record.GetRecordRequest) (*model.RecordResultGRPC, error)
获取语音 get_record
func (*OnebotApiServerStub) GetStatus ¶
func (svc *OnebotApiServerStub) GetStatus(ctx context.Context, in *emptypb.Empty) (*model.StatusResultGRPC, error)
获取状态 get_status
func (*OnebotApiServerStub) GetStrangerInfo ¶
func (svc *OnebotApiServerStub) GetStrangerInfo(ctx context.Context, in *friend.GetStrangerInfoRequest) (*model.StrangerInfoResultGRPC, error)
获取陌生人信息 get_stranger_info user_id: 对方 QQ 号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
func (*OnebotApiServerStub) GetUnidirectionalFriendList ¶
func (svc *OnebotApiServerStub) GetUnidirectionalFriendList(ctx context.Context, in *emptypb.Empty) (*model.FriendListResultGRPC, error)
获取单向好友列表 get_unidirectional_friend_list
func (*OnebotApiServerStub) GetVersionInfo ¶
func (svc *OnebotApiServerStub) GetVersionInfo(ctx context.Context, in *emptypb.Empty) (*model.VersionInfoResultGRPC, error)
获取版本信息 get_version_info
func (*OnebotApiServerStub) HiddenGetWordSlices ¶
func (svc *OnebotApiServerStub) HiddenGetWordSlices(ctx context.Context, in *wrapperspb.StringValue) (*model.WordSlicesResultGRPC, error)
获取中文分词 ( 隐藏 API ) .get_word_slices content 内容
func (*OnebotApiServerStub) HiddenHandleQuickOperation ¶
func (svc *OnebotApiServerStub) HiddenHandleQuickOperation(ctx context.Context, in *cqhttp.HiddenHandleQuickOperationRequestGRPC) (*emptypb.Empty, error)
对事件执行快速操作 ( 隐藏 API ) .handle_quick_operation context 事件上下文 operation 操作
func (*OnebotApiServerStub) MarkMsgAsRead ¶
func (svc *OnebotApiServerStub) MarkMsgAsRead(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
标记消息已读 mark_msg_as_read
func (*OnebotApiServerStub) OcrImage ¶
func (svc *OnebotApiServerStub) OcrImage(ctx context.Context, in *wrapperspb.StringValue) (*model.OcrImageResultGRPC, error)
图片ORC识别 ocr_image
func (*OnebotApiServerStub) ReloadEventFilter ¶
func (svc *OnebotApiServerStub) ReloadEventFilter(ctx context.Context, in *wrapperspb.StringValue) (*emptypb.Empty, error)
重载事件过滤器 reload_event_filter file 事件过滤器文件路径
func (*OnebotApiServerStub) SendGroupForwardMsg ¶
func (svc *OnebotApiServerStub) SendGroupForwardMsg(ctx context.Context, in *message.SendGroupForwardMsgRequest) (*model.SendForwardMessageDataResultGRPC, error)
发送合并转发 ( 群聊 ) send_group_forward_msg
func (*OnebotApiServerStub) SendGroupMsg ¶
func (svc *OnebotApiServerStub) SendGroupMsg(ctx context.Context, in *model.GroupMsgGRPC) (*model.SendMessageResultGRPC, error)
发送群消息 send_group_msg msg 消息
func (*OnebotApiServerStub) SendGroupNotice ¶
func (svc *OnebotApiServerStub) SendGroupNotice(ctx context.Context, in *groupopt.SendGroupNoticeRequest) (*emptypb.Empty, error)
发送群公告 _send_group_notice groupId 群号 content 公告内容 image 图片文件路径(可选)
func (*OnebotApiServerStub) SendGroupSign ¶
func (svc *OnebotApiServerStub) SendGroupSign(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
发送群签到 send_group_sign groupId 群号
func (*OnebotApiServerStub) SendMsg ¶
func (svc *OnebotApiServerStub) SendMsg(ctx context.Context, in *model.MsgForSendGRPC) (*model.SendMessageResultGRPC, error)
发送消息
func (*OnebotApiServerStub) SendPrivateForwardMsg ¶
func (svc *OnebotApiServerStub) SendPrivateForwardMsg(ctx context.Context, in *message.SendPrivateForwardMsgGRPC) (*model.SendForwardMessageDataResultGRPC, error)
发送合并转发 ( 好友 ) send_private_forward_msg
func (*OnebotApiServerStub) SendPrivateMsg ¶
func (svc *OnebotApiServerStub) SendPrivateMsg(ctx context.Context, in *model.PrivateMsgGRPC) (*model.SendMessageResultGRPC, error)
发送私信 send_private_msg msg 消息
func (*OnebotApiServerStub) SetEssenceMsg ¶
func (svc *OnebotApiServerStub) SetEssenceMsg(ctx context.Context, in *wrapperspb.Int64Value) (*emptypb.Empty, error)
设置精华消息 set_essence_msg message_id 消息 ID
func (*OnebotApiServerStub) SetFriendAddRequest ¶
func (svc *OnebotApiServerStub) SetFriendAddRequest(ctx context.Context, in *request.SetFriendAddRequestRequest) (*emptypb.Empty, error)
处理加好友请求 set_friend_add_request flag: 加好友请求的 flag(需从上报的数据中获得) approve: 是否同意请求 remark: 添加后的好友备注(仅在同意时有效)
func (*OnebotApiServerStub) SetGroupAddRequest ¶
func (svc *OnebotApiServerStub) SetGroupAddRequest(ctx context.Context, in *request.SetGroupAddRequestRequest) (*emptypb.Empty, error)
处理加群请求/邀请 set_group_add_request flag: 加群请求的 flag(需从上报的数据中获得) sub_type: add 或 invite,请求类型(需要和上报消息中的 sub_type 字段相符) approve: 是否同意请求/邀请 reason: 拒绝理由(仅在拒绝时有效)
func (*OnebotApiServerStub) SetGroupAdmin ¶
func (svc *OnebotApiServerStub) SetGroupAdmin(ctx context.Context, in *groupopt.SetGroupAdminRequest) (*emptypb.Empty, error)
set_group_admin 设置群管理员 groupId 群号 userId QQ 号 enable true 为设置,false 为取消
func (*OnebotApiServerStub) SetGroupAnonymous ¶
func (svc *OnebotApiServerStub) SetGroupAnonymous(ctx context.Context, in *groupopt.SetGroupAnonymousRequest) (*emptypb.Empty, error)
设置群匿名 set_group_anonymous groupId 群号 enable 是否允许匿名聊天
func (*OnebotApiServerStub) SetGroupAnonymousBan ¶
func (svc *OnebotApiServerStub) SetGroupAnonymousBan(ctx context.Context, in *groupopt.SetGroupAnonymousBanRequest) (*emptypb.Empty, error)
禁言群匿名成员 set_group_anonymous_ban groupId 群号 anonymous 可选, 要禁言的匿名用户对象(群消息上报的 anonymous 字段) anonymousFlag 可选, 要禁言的匿名用户的 flag(需从群消息上报的数据中获得) 上面的 anonymous 和 anonymous_flag 两者任选其一传入即可, 若都传入, 则使用 anonymous。 duration 禁言时长,单位秒,不能超过 30 天
func (*OnebotApiServerStub) SetGroupBan ¶
func (svc *OnebotApiServerStub) SetGroupBan(ctx context.Context, in *groupopt.SetGroupBanRequest) (*emptypb.Empty, error)
禁言群成员 set_group_ban groupId 群号 userId QQ 号 duration 禁言时长,单位秒,0 表示取消禁言
func (*OnebotApiServerStub) SetGroupCard ¶
func (svc *OnebotApiServerStub) SetGroupCard(ctx context.Context, in *groupopt.SetGroupCardRequest) (*emptypb.Empty, error)
设置群名片 set_group_card groupId 群号 userId QQ 号 card 群名片内容,不填或空字符串表示删除群名片
func (*OnebotApiServerStub) SetGroupKick ¶
func (svc *OnebotApiServerStub) SetGroupKick(ctx context.Context, in *groupopt.SetGroupKickRequest) (*emptypb.Empty, error)
群组踢人 set_group_kick groupId 群号 userId QQ 号 rejectAddRequest 是否拒绝此人的加群请求
func (*OnebotApiServerStub) SetGroupLeave ¶
func (svc *OnebotApiServerStub) SetGroupLeave(ctx context.Context, in *groupopt.SetGroupLeaveRequest) (*emptypb.Empty, error)
退出群组 set_group_leave groupId 群号 isDismiss 是否解散,如果登录号是群主,则仅在此项为 true 时能够解散
func (*OnebotApiServerStub) SetGroupName ¶
func (svc *OnebotApiServerStub) SetGroupName(ctx context.Context, in *groupopt.SetGroupNameRequest) (*emptypb.Empty, error)
设置群名 set_group_name groupId 群号 groupName 群名称
func (*OnebotApiServerStub) SetGroupPortrait ¶
func (svc *OnebotApiServerStub) SetGroupPortrait(ctx context.Context, in *groupopt.SetGroupPortraitRequest) (*emptypb.Empty, error)
设置群头像 set_group_portrait groupId 群号 file 图片文件路径 cache 缓存时间
func (*OnebotApiServerStub) SetGroupSpecialTitle ¶
func (svc *OnebotApiServerStub) SetGroupSpecialTitle(ctx context.Context, in *groupopt.SetGroupSpecialTitleRequest) (*emptypb.Empty, error)
设置群头衔 set_group_special_title groupId 群号 userId QQ 号 specialTitle 头衔,不填或空字符串表示删除群头衔 duration 专属头衔有效期, 单位秒, -1 表示永久, 不过此项似乎没有效果, 可能是只有某些特殊的时间长度有效, 有待测试
func (*OnebotApiServerStub) SetGroupWholeBan ¶
func (svc *OnebotApiServerStub) SetGroupWholeBan(ctx context.Context, in *groupopt.SetGroupWholeBanequest) (*emptypb.Empty, error)
设置全群禁言 set_group_whole_ban groupId 群号 enable 是否禁言
func (*OnebotApiServerStub) SetModelShow ¶
func (svc *OnebotApiServerStub) SetModelShow(ctx context.Context, in *account.SetModelShowRequest) (*emptypb.Empty, error)
func (*OnebotApiServerStub) SetQQProfile ¶
func (svc *OnebotApiServerStub) SetQQProfile(ctx context.Context, in *model.QQProfileGRPC) (*emptypb.Empty, error)
func (*OnebotApiServerStub) SetRestart ¶
func (svc *OnebotApiServerStub) SetRestart(ctx context.Context, in *wrapperspb.Int32Value) (*emptypb.Empty, error)
重启 Go-CqHttp set_restart delay 要延迟的毫秒数, 如果默认情况下无法重启, 可以尝试设置延迟为 2000 左右
func (*OnebotApiServerStub) UploadGroupFile ¶
func (svc *OnebotApiServerStub) UploadGroupFile(ctx context.Context, in *file.UploadGroupFileRequest) (*emptypb.Empty, error)
上传群文件 upload_group_file groupId 群号 file 文件路径 name 文件名 folder 群文件目录ID
func (*OnebotApiServerStub) UploadPrivateFile ¶
func (svc *OnebotApiServerStub) UploadPrivateFile(ctx context.Context, in *file.UploadPrivateFileRequest) (*emptypb.Empty, error)
上传好友文件 upload_private_file userId 用户ID file 文件路径 name 文件名 UploadPrivateFile(userId int64, file string, name string) error