Documentation
¶
Index ¶
- type Bot
- func (b *Bot) CallApi(Action string, param interface{}) gjson.Result
- func (b *Bot) CanSendImage() bool
- func (b *Bot) CanSendRecord() bool
- func (b *Bot) CheckUrlSafely(url string) int
- func (b *Bot) CleanCache()
- func (b *Bot) DeleteEssenceMsg(messageId int)
- func (b *Bot) DeleteMsg(messageId int32)
- func (b *Bot) Do(i interface{})
- func (b *Bot) DownloadFile(url string, threadCount int, headers []string) gjson.Result
- func (b *Bot) GetCookies(domain string) gjson.Result
- func (b *Bot) GetCredentials(domain string) gjson.Result
- func (b *Bot) GetCsrfToken() gjson.Result
- func (b *Bot) GetEssenceMsgList(groupId int) gjson.Result
- func (b *Bot) GetForwardMsg(messageId int) gjson.Result
- func (b *Bot) GetFriendList() gjson.Result
- func (b *Bot) GetGroupAtAllRemain(groupId int) gjson.Result
- func (b *Bot) GetGroupFileSystemInfo(groupId int) gjson.Result
- func (b *Bot) GetGroupFileUrl(groupId int, fileId string, busid int) gjson.Result
- func (b *Bot) GetGroupFilesByFolder(groupId int, folderId string) gjson.Result
- func (b *Bot) GetGroupHonorInfo(groupId int, honorType string) gjson.Result
- func (b *Bot) GetGroupInfo(groupId int, noCache bool) gjson.Result
- func (b *Bot) GetGroupList() gjson.Result
- func (b *Bot) GetGroupMemberInfo(groupId int, userId int, noCache bool) gjson.Result
- func (b *Bot) GetGroupMemberList(groupId int) gjson.Result
- func (b *Bot) GetGroupMsgHistory(messageSeq int64, groupId int) gjson.Result
- func (b *Bot) GetGroupRootFiles(groupId int) gjson.Result
- func (b *Bot) GetGroupSystemMsg() gjson.Result
- func (b *Bot) GetImage(file string) gjson.Result
- func (b *Bot) GetLoginInfo() gjson.Result
- func (b *Bot) GetMsg(messageId int32) gjson.Result
- func (b *Bot) GetMsgSpecial(messageId int) gjson.Result
- func (b *Bot) GetOnlineClients(noCache bool) gjson.Result
- func (b *Bot) GetRecord(file, outFormat string) gjson.Result
- func (b *Bot) GetResponse(echo string) ([]byte, error)
- func (b *Bot) GetSelfId() int64
- func (b *Bot) GetStatus() gjson.Result
- func (b *Bot) GetStrangerInfo(userId int, noCache bool) gjson.Result
- func (b *Bot) GetVipInfoTest(UserId int) gjson.Result
- func (b *Bot) GetWordSlices(content string) gjson.Result
- func (b *Bot) OcrImage(image string) gjson.Result
- func (b *Bot) ReloadEventFilter()
- func (b *Bot) SendGroupForwardMsg(groupId int, messages interface{})
- func (b *Bot) SendGroupMsg(groupId int, message interface{}) int32
- func (b *Bot) SendGroupNotice(groupId int, content string)
- func (b *Bot) SendLike(userId int, times int)
- func (b *Bot) SendMsg(messageType string, userId int, groupId int, message interface{}) int32
- func (b *Bot) SendPrivateMsg(userId int, message interface{}) int32
- func (b *Bot) SetEssenceMsg(messageId int)
- func (b *Bot) SetFriendAddRequest(flag string, approve bool, remark string)
- func (b *Bot) SetGroupAddRequest(flag string, subType string, approve bool, reason string)
- func (b *Bot) SetGroupAdmin(groupId int, userId int, enable bool)
- func (b *Bot) SetGroupAnonymous(groupId int, enable bool)
- func (b *Bot) SetGroupAnonymousBan(groupId int, flag string, duration int)
- func (b *Bot) SetGroupBan(groupId int, userId int, duration int)
- func (b *Bot) SetGroupCard(groupId int, userId int, card string)
- func (b *Bot) SetGroupKick(groupId int, userId int, rejectAddRequest bool)
- func (b *Bot) SetGroupLeave(groupId int, isDisMiss bool)
- func (b *Bot) SetGroupName(groupId int, groupName string)
- func (b *Bot) SetGroupNameSpecial(groupId int, groupName string)
- func (b *Bot) SetGroupPortrait(groupId int, file string, cache int)
- func (b *Bot) SetGroupSpecialTitle(groupId int, userId int, specialTitle string, duration int)
- func (b *Bot) SetGroupWholeBan(groupId int, enable bool)
- func (b *Bot) SetRestart(delay int)
- func (b *Bot) UploadGroupFile(groupId int, file string, name string, folder string)
- type Driver
- func (d *Driver) AddWebHook(selfID int64, postHost string, postPort int)
- func (d *Driver) GetBot(i int64) interface{}
- func (d *Driver) GetBots() map[int64]interface{}
- func (d *Driver) GetEvent() chan []byte
- func (d *Driver) OnConnect(f func(selfId int64, host string, clientRole string))
- func (d *Driver) OnDisConnect(f func(selfId int64))
- func (d *Driver) Run()
- func (d *Driver) SetConfig(config map[string]interface{})
- func (d *Driver) SetToken(token string)
- type UseApi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) CheckUrlSafely ¶
func (*Bot) DeleteEssenceMsg ¶
func (*Bot) Do ¶
func (b *Bot) Do(i interface{})
Do *
- @Description: 执行一个api的调用
- @receiver b
- @param i
- example
func (*Bot) DownloadFile ¶
DownloadFile
@Description: @receiver b @param url string @param threadCount int @param headers []string @return DownloadFilePath
func (*Bot) GetCredentials ¶
GetCredentials
@Description: @receiver b @param domain string @return Credentials
func (*Bot) GetForwardMsg ¶
GetForwardMsg
@Description: @receiver b @param messageId int @return []ForwardMsg
func (*Bot) GetGroupAtAllRemain ¶
GetGroupAtAllRemain
@Description: @receiver b @param groupId int @return GroupAtAllRemain
func (*Bot) GetGroupFileSystemInfo ¶
GetGroupFileSystemInfo
@Description: @receiver b @param groupId int @return GroupFileSystemInfo
func (*Bot) GetGroupFileUrl ¶
GetGroupFileUrl
@Description: @receiver b @param groupId int @param fileId string @param busid int @return FileUrl
func (*Bot) GetGroupFilesByFolder ¶
GetGroupFilesByFolder
@Description: @receiver b @param groupId int @param folderId string @return GroupFilesByFolder
func (*Bot) GetGroupHonorInfo ¶
GetGroupHonorInfo
@Description: @receiver b @param groupId int @param honorType string @return GroupHonorInfo
func (*Bot) GetGroupInfo ¶
GetGroupInfo *
- @Description:
- @receiver b
- @param groupId
- @param noCache
- @return gjson.Result
- example
func (*Bot) GetGroupMemberInfo ¶
GetGroupMemberInfo
@Description: @receiver b @param groupId int @param userId int @param noCache bool @return GroupMemberInfo
func (*Bot) GetGroupMemberList ¶
GetGroupMemberList
@Description: @receiver b @param groupId int @return []GroupMemberInfo
func (*Bot) GetGroupMsgHistory ¶
GetGroupMsgHistory
@Description: @receiver b @param messageSeq int64 @param groupId int @return MessageHistory
func (*Bot) GetGroupRootFiles ¶
GetGroupRootFiles
@Description: @receiver b @param groupId int @return GroupRootFiles
func (*Bot) GetMsgSpecial ¶
GetMsgSpecial
@Description: @receiver b @param messageId int @return MsgData
func (*Bot) GetOnlineClients ¶
GetOnlineClients *
- @Description:
- @receiver b
- @param noCache
- @return gjson.Result
- example
func (*Bot) GetRecord ¶
GetRecord
@Description: @receiver b @param file file @param outFormat string @return Record
func (*Bot) GetResponse ¶
GetResponse *
- @Description: 获取一个api调用的响应
- @receiver b
- @param echo api调用的唯一标识
- @return []byte
- @return error
- example
func (*Bot) GetStrangerInfo ¶
GetStrangerInfo
@Description: @receiver b @param userId int @param noCache bool @return Senders
func (*Bot) GetVipInfoTest ¶
GetVipInfoTest
@Description: @receiver b @param UserId int @return VipInfo
func (*Bot) GetWordSlices ¶
GetWordSlices
@Description: @receiver b @param content string @return []string
func (*Bot) ReloadEventFilter ¶
func (b *Bot) ReloadEventFilter()
ReloadEventFilter
@Description: @receiver b
func (*Bot) SendGroupForwardMsg ¶
SendGroupForwardMsg
@Description: @receiver b @param groupId int @param messages []Node
func (*Bot) SendGroupMsg ¶
SendGroupMsg *
- @Description:
- @receiver b
- @param groupId
- @param message
- @return int32
func (*Bot) SendGroupNotice ¶
SendGroupNotice
@Description: @receiver b @param groupId int @param content string
func (*Bot) SendMsg ¶
SendMsg
@Description: @receiver b @param messageType string @param userId int @param groupId int @param message string @param autoEscape bool @return int32
func (*Bot) SendPrivateMsg ¶
SendPrivateMsg
@Description: @receiver b @param userId int @param message string @param autoEscape bool @return int32
func (*Bot) SetEssenceMsg ¶
func (*Bot) SetFriendAddRequest ¶
SetFriendAddRequest
@Description: @receiver b @param flag string @param approve bool @param remark string
func (*Bot) SetGroupAddRequest ¶
SetGroupAddRequest
@Description: @receiver b @param flag string @param subType string @param approve bool @param reason string
func (*Bot) SetGroupAdmin ¶
SetGroupAdmin
@Description: @receiver b @param groupId int @param userId int @param enable bool
func (*Bot) SetGroupAnonymous ¶
SetGroupAnonymous
@Description: @receiver b @param groupId int @param enable bool
func (*Bot) SetGroupAnonymousBan ¶
SetGroupAnonymousBan
@Description: @receiver b @param groupId int @param flag string @param duration int
func (*Bot) SetGroupBan ¶
SetGroupBan
@Description: @receiver b @param groupId int @param userId int @param duration int
func (*Bot) SetGroupCard ¶
SetGroupCard
@Description: @receiver b @param groupId int @param userId int @param card string
func (*Bot) SetGroupKick ¶
SetGroupKick
@Description: @receiver b @param groupId int @param userId int @param rejectAddRequest bool
func (*Bot) SetGroupLeave ¶
SetGroupLeave
@Description: @receiver b @param groupId int @param isDisMiss bool
func (*Bot) SetGroupName ¶
SetGroupName
@Description: @receiver b @param groupId int @param groupName string
func (*Bot) SetGroupNameSpecial ¶
SetGroupNameSpecial
@Description: @receiver b @param groupId int @param groupName string
func (*Bot) SetGroupPortrait ¶
SetGroupPortrait
@Description: @receiver b @param groupId int @param file string @param cache int
func (*Bot) SetGroupSpecialTitle ¶
SetGroupSpecialTitle
@Description: @receiver b @param groupId int @param userId int @param specialTitle string @param duration int
func (*Bot) SetGroupWholeBan ¶
SetGroupWholeBan
@Description: @receiver b @param groupId int @param enable bool
type Driver ¶
type Driver struct { Name string // contains filtered or unexported fields }