libgocqhttp

package module
v0.0.0-...-15b6560 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 4 Imported by: 0

README

libgocqhttp

介绍

Go-CQHTTP用于Go语言的SDK

安装教程
  1. Git clone https://gitee.com/Watcher_Saria/libgocqhttp.git
  2. 在SDK目录中添加该项目文件
使用说明

使用问题请转向https://docs.go-cqhttp.org/
作者并非技术大牛,仅编程新手,Go语言和Git都是第一次使用,如在技术或其他方面有建议还望不吝赐教。 如有bug或其他问题可提交issue,尽可能第一时间回复

参与贡献
  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func At

func At(qq int64, name string) string

func CanSendImage

func CanSendImage(Address string) response

CanSendImage 检查是否可以发送图片

func CanSendRecord

func CanSendRecord(Address string) response

CanSendRecord 检查是否可以发送语音

func Cardimage

func Cardimage(file string, minwidth int64, minheight int64, maxwidth int64, maxheight int64, source string, icon string) string

func CheckUrlSafely

func CheckUrlSafely(Address string, Url string) response

CheckUrlSafely 检查链接安全性

func DeleteEssenceMsg

func DeleteEssenceMsg(Address string, MessageId int32) response

DeleteEssenceMsg 移出精华消息

func DeleteFriend

func DeleteFriend(Address string, FriendId int64) response

DeleteFriend 删除好友

func DeleteMsg

func DeleteMsg(Address string, MessageId int32) response

DeleteMsg 撤回消息

func DownloadFile

func DownloadFile(Address string, Url string, ThreadCount int32, Headers string) response

DownloadFile 下载文件到缓存目录

func Face

func Face(id int) string

func Forward

func Forward(id string) string

func GetEssenceMsgList

func GetEssenceMsgList(Address string, GroupId int64) _response

GetEssenceMsgList 获取精华消息列表

func GetForwardMsg

func GetForwardMsg(Address string, MessageId int32) response

GetForwardMsg 获取合并转发内容

func GetFriendList

func GetFriendList(Address string) _response

GetFriendList 获取好友列表

func GetGroupAtAllRemain

func GetGroupAtAllRemain(Address string, GroupId int64) response

GetGroupAtAllRemain 获取群 @全体成员 剩余次数

func GetGroupFileSystemInfo

func GetGroupFileSystemInfo(Address string, GroupId int64) response

GetGroupFileSystemInfo 获取群文件系统信息

func GetGroupFilesByFolder

func GetGroupFilesByFolder(Address string, GroupId int64, FolderId string) response

GetGroupFilesByFolder 获取群子目录文件列表

func GetGroupFilesUrl

func GetGroupFilesUrl(Address string, GroupId int64, FileId string, Busid int32) response

GetGroupFilesUrl 获取群文件资源链接

func GetGroupHonorInfo

func GetGroupHonorInfo(Address string, GroupId int64, Type string)

GetGroupHonorInfo 获取群荣誉信息

func GetGroupInfo

func GetGroupInfo(Address string, GroupId int64, NoCache bool) response

GetGroupInfo 获取群信息

func GetGroupList

func GetGroupList(Address string) _response

GetGroupList 获取群列表

func GetGroupMemberInfo

func GetGroupMemberInfo(Address string, GroupId int64, UserId int64, NoCache bool) response

GetGroupMemberInfo 获取群成员信息

func GetGroupMemberList

func GetGroupMemberList(Address string, GroupId int64) _response

GetGroupMemberList 获取群成员列表

func GetGroupMsgHistory

func GetGroupMsgHistory(Address string, GroupId int64, MessageSeq int64) response

GetGroupMsgHistory 获取群消息历史记录

func GetGroupRootFiles

func GetGroupRootFiles(Address string, GroupId int64) response

GetGroupRootFiles 获取群根目录文件列表

func GetGroupSystemMessage

func GetGroupSystemMessage(Address string) response

GetGroupSystemMessage 获取群系统消息

func GetImage

func GetImage(Address string, file string) response

GetImage 获取图片信息

func GetLoginInfo

func GetLoginInfo(Address string) response

GetLoginInfo 获取登录号信息

func GetModelShow

func GetModelShow(Address string, Model string) response

GetModelShow 获取在线机型

func GetMsg

func GetMsg(Address string, MessageId int32) response

GetMsg 获取消息

func GetOnlineClients

func GetOnlineClients(Address string, NoCache bool) response

GetOnlineClients 获取当前账号在线客户端列表

func GetStatus

func GetStatus(Address string) response

GetStatus 获取状态

func GetStrangerInfo

func GetStrangerInfo(Address string, UserId int64, NoCache bool) response

GetStrangerInfo 获取陌生人信息

func GetVersionInfo

func GetVersionInfo(Address string) response

GetVersionInfo 获取版本信息

func GetVipInfo

func GetVipInfo(Address string, UserId int64) response

GetVipInfo 获取VIP信息

func GetWordSlice

func GetWordSlice(Address string, Content string) response

GetWordSlices 获取中文分词 ( 隐藏 API )

func Gift

func Gift(qq int64, id int) string

func HandleQuickOperation

func HandleQuickOperation(Address string, Context string, Operation string) response

HandleQuickOperation 对事件执行快速操作 ( 隐藏 API )

func Image

func Image(file string, _type string, subType string, url string, cache bool, id int, c int) string

func Json

func Json(data string, resid int32) string

func Music

func Music(_type string, id int64, url string, audio string, title string, content string, image string) string

func OcrImage

func OcrImage(Address string, Image string) response

OCRImage 图片 OCR

func Poke

func Poke(qq int64) string

func QidianGetAccountInfo

func QidianGetAccountInfo(Address string) response

QidianGetAccountInfo 获取企点账号信息

func Record

func Record(file string, magic bool, cache bool, proxy bool, timeout int) string

func Redbag

func Redbag(title string) string

func ReloadEventFilter

func ReloadEventFilter(Address string, File string) response

ReloadEventFilter 重载事件过滤器

func Reply

func Reply(id int, text string, qq int64, time int64, seq int64) string

func SendGroupForwardMsg

func SendGroupForwardMsg(Address string, GroupId int64, Messages string, AutoEscape bool) response

SendGroupForwardMsg 发送合并转发 ( 群 )

func SendGroupMsg

func SendGroupMsg(Address string, GroupId int64, Message string, AutoEscape bool) response

SendGroupMsg 发送群消息

func SendGroupNotice

func SendGroupNotice(Address string, GroupId int64, Content string, Image string) response

SendGroupNotice 发送群公告

func SendMsg

func SendMsg(Address string, MessageType string, UserId int64, GroupId int64, Message string, AutoEscape bool) response

SendMsg 发送消息

func SendPrivateMsg

func SendPrivateMsg(Address string, UserId int64, GroupId int64, Message string, AutoEscape bool) response

SendPrivateMsg 发送私聊消息

func SetEssenceMsg

func SetEssenceMsg(Address string, MessageId int32) response

SetEssenceMsg 设置精华消息

func SetFriendAddRequest

func SetFriendAddRequest(Address string, Flag string, Approve bool, Remark string) response

SetFriendAddRequest 处理加好友请求

func SetGroupAddRequest

func SetGroupAddRequest(Address string, Flag string, SubType string, Approve bool, Reason string) response

SetGroupAddRequest 处理加群请求/邀请

func SetGroupAdmin

func SetGroupAdmin(Address string, GroupId int64, UserId int64, Enable bool) response

SetGroupAdmin 群组设置管理员

func SetGroupAnonymous

func SetGroupAnonymous(Address string, GroupId int64, Enable bool) response

SetGroupAnonymous 群组匿名

func SetGroupAnonymousBan

func SetGroupAnonymousBan(Address string, GroupId int64, Anonymous anonymous, Flag string, Duration int) response

SetGroupAnonymousBan 群组匿名用户禁言

func SetGroupBan

func SetGroupBan(Address string, GroupId int64, UserId int64, Duration int) response

SetGroupBan 群组单人禁言

func SetGroupCard

func SetGroupCard(Address string, GroupId int64, UserId int64, card string) response

SetGroupCard 设置群名片 ( 群备注 )

func SetGroupKick

func SetGroupKick(Address string, GroupId int64, UserId int64, RejectAddRequest bool) response

SetGroupKick 群组踢人

func SetGroupLeave

func SetGroupLeave(Address string, GroupId int64, IsDismiss bool) response

SetGroupLeave 退出群组

func SetGroupName

func SetGroupName(Address string, GroupId int64, GroupName string) response

SetGroupName 设置群名

func SetGroupPortrait

func SetGroupPortrait(Address string, GroupId int64, File string, Cache int) response

SetGroupPortrait 设置群头像

func SetGroupSpecialTitle

func SetGroupSpecialTitle(Address string, GroupId int64, UserId int64, SpecialTitle string, Duration int) response

SetGroupSpecialTitle 设置群组专属头衔

func SetGroupWholeBan

func SetGroupWholeBan(Address string, GroupId int64, Enable bool) response

SetGroupWholeBan 群组全员禁言

func SetModelShow

func SetModelShow(Address string, Model string, ModelShow string) response

SetModelShow 设置在线机型

func SetRestart

func SetRestart(Address string) response

SetRestart 重启 go-cqhttp

func Share

func Share(url string, title string, content string, image string) string

func Tts

func Tts(text string) string

func UploadGroupFile

func UploadGroupFile(Address string, GroupId int64, File string, Name string, Folder string) response

UploadGroupFile 上传群文件

func Video

func Video(file string, cover string, c int) string

func Xml

func Xml(data string, resid int32) string

Types

type Client

type Client struct {
	AppId      int64  `json:"app_id"`
	DeviceKind string `json:"device_kind"`
	DeviceName string `json:"device_name"`
}

type Event

type Event struct {
	Anonymous   anonymous `json:"anonymous"`
	CardNew     string    `json:"card_new"`
	CardOld     string    `json:"card_old"`
	Client      string    `json:"client"`
	Comment     string    `json:"comment"`
	Duration    int64     `json:"duration"`
	File        file      `json:"file"`
	Flag        string    `json:"flag"`
	Font        int32     `json:"font"`
	GroupId     int64     `json:"group_id"`
	Message     string    `json:"message"`
	MessageID   int32     `json:"message_id"`
	MessageSeq  int32     `json:"message_seq"`
	MessageType string    `json:"message_type"`
	NoticeType  string    `json:"notice_type"`
	Online      bool      `json:"online"`
	OperatorID  int64     `json:"operator_id"`
	PostType    string    `json:"post_type"`
	RawMessage  string    `json:"raw_message"`
	RequestType string    `json:"request_type"`
	SelfID      int64     `json:"self_id"`
	Sender      sender    `json:"sender"`
	SenderID    int64     `json:"sender_id"`
	SubType     string    `json:"sub_type"`
	TargetID    int64     `json:"target_id"`
	TempSource  int       `json:"temp_source"`
	Time        int64     `json:"time"`
	Title       string    `json:"title"`
	UserID      int64     `json:"user_id"`
}

type File

type File struct {
	Busid         int32  `json:"busid"`
	DeadTime      int64  `json:"dead_time"`
	DownloadTimes int32  `json:"download_times"`
	FileID        string `json:"file_id"`
	FileName      string `json:"file_name"`
	FileSize      int64  `json:"file_size"`
	GroupID       int32  `json:"group_id"`
	ModifyTime    int64  `json:"modify_time"`
	Uploader      int64  `json:"uploader"`
	UploaderName  string `json:"uploader_name"`
	UploadTime    int64  `json:"upload_time"`
}

type Folder

type Folder struct {
	Creator        int64  `json:"creator"`
	CreatorName    string `json:"creator_name"`
	CreateTime     int64  `json:"create_time"`
	FolderID       string `json:"folder_id"`
	FolderName     string `json:"folder_name"`
	GroupID        int32  `json:"group_id"`
	TotalFileCount int32  `json:"total_file_count"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL