cqhttp_positive_ws_driver

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

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) CallApi

func (b *Bot) CallApi(Action string, param interface{}) gjson.Result

func (*Bot) CanSendImage

func (b *Bot) CanSendImage() bool

CanSendImage

@Description:
@receiver b
@return Bool

func (*Bot) CanSendRecord

func (b *Bot) CanSendRecord() bool

CanSendRecord

@Description:
@receiver b
@return Bool

func (*Bot) CheckUrlSafely

func (b *Bot) CheckUrlSafely(url string) int

func (*Bot) CleanCache

func (b *Bot) CleanCache()

CleanCache *

  • @Description:
  • @receiver b
  • example

func (*Bot) DeleteEssenceMsg

func (b *Bot) DeleteEssenceMsg(messageId int)

func (*Bot) DeleteMsg

func (b *Bot) DeleteMsg(messageId int32)

DeleteMsg

@Description:
@receiver b
@param messageId int32

func (*Bot) Do

func (b *Bot) Do(i interface{})

Do *

  • @Description: 执行一个api的调用
  • @receiver b
  • @param i
  • example

func (*Bot) DownloadFile

func (b *Bot) DownloadFile(url string, threadCount int, headers []string) gjson.Result

DownloadFile

@Description:
@receiver b
@param url string
@param threadCount int
@param headers []string
@return DownloadFilePath

func (*Bot) GetCookies

func (b *Bot) GetCookies(domain string) gjson.Result

GetCookies

@Description:
@receiver b
@param domain string
@return Cookie

func (*Bot) GetCredentials

func (b *Bot) GetCredentials(domain string) gjson.Result

GetCredentials

@Description:
@receiver b
@param domain string
@return Credentials

func (*Bot) GetCsrfToken

func (b *Bot) GetCsrfToken() gjson.Result

GetCsrfToken

@Description:
@receiver b
@return CsrfToken

func (*Bot) GetEssenceMsgList

func (b *Bot) GetEssenceMsgList(groupId int) gjson.Result

func (*Bot) GetForwardMsg

func (b *Bot) GetForwardMsg(messageId int) gjson.Result

GetForwardMsg

@Description:
@receiver b
@param messageId int
@return []ForwardMsg

func (*Bot) GetFriendList

func (b *Bot) GetFriendList() gjson.Result

GetFriendList *

  • @Description:
  • @receiver b
  • @return gjson.Result
  • example

func (*Bot) GetGroupAtAllRemain

func (b *Bot) GetGroupAtAllRemain(groupId int) gjson.Result

GetGroupAtAllRemain

@Description:
@receiver b
@param groupId int
@return GroupAtAllRemain

func (*Bot) GetGroupFileSystemInfo

func (b *Bot) GetGroupFileSystemInfo(groupId int) gjson.Result

GetGroupFileSystemInfo

@Description:
@receiver b
@param groupId int
@return GroupFileSystemInfo

func (*Bot) GetGroupFileUrl

func (b *Bot) GetGroupFileUrl(groupId int, fileId string, busid int) gjson.Result

GetGroupFileUrl

@Description:
@receiver b
@param groupId int
@param fileId string
@param busid int
@return FileUrl

func (*Bot) GetGroupFilesByFolder

func (b *Bot) GetGroupFilesByFolder(groupId int, folderId string) gjson.Result

GetGroupFilesByFolder

@Description:
@receiver b
@param groupId int
@param folderId string
@return GroupFilesByFolder

func (*Bot) GetGroupHonorInfo

func (b *Bot) GetGroupHonorInfo(groupId int, honorType string) gjson.Result

GetGroupHonorInfo

@Description:
@receiver b
@param groupId int
@param honorType string
@return GroupHonorInfo

func (*Bot) GetGroupInfo

func (b *Bot) GetGroupInfo(groupId int, noCache bool) gjson.Result

GetGroupInfo *

  • @Description:
  • @receiver b
  • @param groupId
  • @param noCache
  • @return gjson.Result
  • example

func (*Bot) GetGroupList

func (b *Bot) GetGroupList() gjson.Result

GetGroupList

@Description:
@receiver b
@return []GroupInfo

func (*Bot) GetGroupMemberInfo

func (b *Bot) GetGroupMemberInfo(groupId int, userId int, noCache bool) gjson.Result

GetGroupMemberInfo

@Description:
@receiver b
@param groupId int
@param userId int
@param noCache bool
@return GroupMemberInfo

func (*Bot) GetGroupMemberList

func (b *Bot) GetGroupMemberList(groupId int) gjson.Result

GetGroupMemberList

@Description:
@receiver b
@param groupId int
@return []GroupMemberInfo

func (*Bot) GetGroupMsgHistory

func (b *Bot) GetGroupMsgHistory(messageSeq int64, groupId int) gjson.Result

GetGroupMsgHistory

@Description:
@receiver b
@param messageSeq int64
@param groupId int
@return MessageHistory

func (*Bot) GetGroupRootFiles

func (b *Bot) GetGroupRootFiles(groupId int) gjson.Result

GetGroupRootFiles

@Description:
@receiver b
@param groupId int
@return GroupRootFiles

func (*Bot) GetGroupSystemMsg

func (b *Bot) GetGroupSystemMsg() gjson.Result

GetGroupSystemMsg

@Description:
@receiver b
@return GroupSystemMsg

func (*Bot) GetImage

func (b *Bot) GetImage(file string) gjson.Result

GetImage

@Description:
@receiver b
@param file string
@return Image

func (*Bot) GetLoginInfo

func (b *Bot) GetLoginInfo() gjson.Result

GetLoginInfo

@Description:
@receiver b
@return LoginInfo

func (*Bot) GetMsg

func (b *Bot) GetMsg(messageId int32) gjson.Result

GetMsg

@Description:
@receiver b
@param messageId int32
@return GetMessage

func (*Bot) GetMsgSpecial

func (b *Bot) GetMsgSpecial(messageId int) gjson.Result

GetMsgSpecial

@Description:
@receiver b
@param messageId int
@return MsgData

func (*Bot) GetOnlineClients

func (b *Bot) GetOnlineClients(noCache bool) gjson.Result

GetOnlineClients *

  • @Description:
  • @receiver b
  • @param noCache
  • @return gjson.Result
  • example

func (*Bot) GetRecord

func (b *Bot) GetRecord(file, outFormat string) gjson.Result

GetRecord

@Description:
@receiver b
@param file file
@param outFormat string
@return Record

func (*Bot) GetResponse

func (b *Bot) GetResponse(echo string) ([]byte, error)

GetResponse *

  • @Description: 获取一个api调用的响应
  • @receiver b
  • @param echo api调用的唯一标识
  • @return []byte
  • @return error
  • example

func (*Bot) GetSelfId

func (b *Bot) GetSelfId() int64

GetSelfId *

  • @Description: 获取bot的账号
  • @receiver b
  • @return int64
  • example

func (*Bot) GetStatus

func (b *Bot) GetStatus() gjson.Result

GetStatus

@Description:
@receiver b
@return OnlineStatus

func (*Bot) GetStrangerInfo

func (b *Bot) GetStrangerInfo(userId int, noCache bool) gjson.Result

GetStrangerInfo

@Description:
@receiver b
@param userId int
@param noCache bool
@return Senders

func (*Bot) GetVipInfoTest

func (b *Bot) GetVipInfoTest(UserId int) gjson.Result

GetVipInfoTest

@Description:
@receiver b
@param UserId int
@return VipInfo

func (*Bot) GetWordSlices

func (b *Bot) GetWordSlices(content string) gjson.Result

GetWordSlices

@Description:
@receiver b
@param content string
@return []string

func (*Bot) OcrImage

func (b *Bot) OcrImage(image string) gjson.Result

OcrImage

@Description:
@receiver b
@param image string
@return OcrImage

func (*Bot) ReloadEventFilter

func (b *Bot) ReloadEventFilter()

ReloadEventFilter

@Description:
@receiver b

func (*Bot) SendGroupForwardMsg

func (b *Bot) SendGroupForwardMsg(groupId int, messages interface{})

SendGroupForwardMsg

@Description:
@receiver b
@param groupId int
@param messages []Node

func (*Bot) SendGroupMsg

func (b *Bot) SendGroupMsg(groupId int, message interface{}) int32

SendGroupMsg *

  • @Description:
  • @receiver b
  • @param groupId
  • @param message
  • @return int32

func (*Bot) SendGroupNotice

func (b *Bot) SendGroupNotice(groupId int, content string)

SendGroupNotice

@Description:
@receiver b
@param groupId int
@param content string

func (*Bot) SendLike

func (b *Bot) SendLike(userId int, times int)

SendLike

@Description:
@receiver b
@param userId int
@param times int

func (*Bot) SendMsg

func (b *Bot) SendMsg(messageType string, userId int, groupId int, message interface{}) int32

SendMsg

@Description:
@receiver b
@param messageType string
@param userId int
@param groupId int
@param message string
@param autoEscape bool
@return int32

func (*Bot) SendPrivateMsg

func (b *Bot) SendPrivateMsg(userId int, message interface{}) int32

SendPrivateMsg

@Description:
@receiver b
@param userId int
@param message string
@param autoEscape bool
@return int32

func (*Bot) SetEssenceMsg

func (b *Bot) SetEssenceMsg(messageId int)

func (*Bot) SetFriendAddRequest

func (b *Bot) SetFriendAddRequest(flag string, approve bool, remark string)

SetFriendAddRequest

@Description:
@receiver b
@param flag string
@param approve bool
@param remark string

func (*Bot) SetGroupAddRequest

func (b *Bot) SetGroupAddRequest(flag string, subType string, approve bool, reason string)

SetGroupAddRequest

@Description:
@receiver b
@param flag string
@param subType string
@param approve bool
@param reason string

func (*Bot) SetGroupAdmin

func (b *Bot) SetGroupAdmin(groupId int, userId int, enable bool)

SetGroupAdmin

@Description:
@receiver b
@param groupId int
@param userId int
@param enable bool

func (*Bot) SetGroupAnonymous

func (b *Bot) SetGroupAnonymous(groupId int, enable bool)

SetGroupAnonymous

@Description:
@receiver b
@param groupId int
@param enable bool

func (*Bot) SetGroupAnonymousBan

func (b *Bot) SetGroupAnonymousBan(groupId int, flag string, duration int)

SetGroupAnonymousBan

@Description:
@receiver b
@param groupId int
@param flag string
@param duration int

func (*Bot) SetGroupBan

func (b *Bot) SetGroupBan(groupId int, userId int, duration int)

SetGroupBan

@Description:
@receiver b
@param groupId int
@param userId int
@param duration int

func (*Bot) SetGroupCard

func (b *Bot) SetGroupCard(groupId int, userId int, card string)

SetGroupCard

@Description:
@receiver b
@param groupId int
@param userId int
@param card string

func (*Bot) SetGroupKick

func (b *Bot) SetGroupKick(groupId int, userId int, rejectAddRequest bool)

SetGroupKick

@Description:
@receiver b
@param groupId int
@param userId int
@param rejectAddRequest bool

func (*Bot) SetGroupLeave

func (b *Bot) SetGroupLeave(groupId int, isDisMiss bool)

SetGroupLeave

@Description:
@receiver b
@param groupId int
@param isDisMiss bool

func (*Bot) SetGroupName

func (b *Bot) SetGroupName(groupId int, groupName string)

SetGroupName

@Description:
@receiver b
@param groupId int
@param groupName string

func (*Bot) SetGroupNameSpecial

func (b *Bot) SetGroupNameSpecial(groupId int, groupName string)

SetGroupNameSpecial

@Description:
@receiver b
@param groupId int
@param groupName string

func (*Bot) SetGroupPortrait

func (b *Bot) SetGroupPortrait(groupId int, file string, cache int)

SetGroupPortrait

@Description:
@receiver b
@param groupId int
@param file string
@param cache int

func (*Bot) SetGroupSpecialTitle

func (b *Bot) SetGroupSpecialTitle(groupId int, userId int, specialTitle string, duration int)

SetGroupSpecialTitle

@Description:
@receiver b
@param groupId int
@param userId int
@param specialTitle string
@param duration int

func (*Bot) SetGroupWholeBan

func (b *Bot) SetGroupWholeBan(groupId int, enable bool)

SetGroupWholeBan

@Description:
@receiver b
@param groupId int
@param enable bool

func (*Bot) SetRestart

func (b *Bot) SetRestart(delay int)

SetRestart

@Description:
@receiver b
@param delay int

func (*Bot) UploadGroupFile

func (b *Bot) UploadGroupFile(groupId int, file string, name string, folder string)

UploadGroupFile

@Description:
@receiver b
@param groupId int
@param file string
@param name string
@param folder string

type Driver

type Driver struct {
	Name string
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver() *Driver

func (*Driver) AddWebHook added in v1.1.6

func (d *Driver) AddWebHook(selfID int64, postHost string, postPort int)

func (*Driver) GetBot

func (d *Driver) GetBot(i int64) interface{}

func (*Driver) GetBots

func (d *Driver) GetBots() map[int64]interface{}

GetBots *

  • @Description:
  • @receiver d
  • @return map[int64]interface{}
  • example

func (*Driver) GetEvent

func (d *Driver) GetEvent() chan []byte

func (*Driver) OnConnect

func (d *Driver) OnConnect(f func(selfId int64, host string, clientRole string))

OnConnect *

  • @Description:
  • @receiver d
  • @param f
  • example

func (*Driver) OnDisConnect

func (d *Driver) OnDisConnect(f func(selfId int64))

OnDisConnect *

  • @Description:
  • @receiver d
  • @param f
  • example

func (*Driver) Run

func (d *Driver) Run()

func (*Driver) SetConfig added in v1.1.6

func (d *Driver) SetConfig(config map[string]interface{})

func (*Driver) SetToken added in v1.1.6

func (d *Driver) SetToken(token string)

type UseApi

type UseApi struct {
	Action string      `json:"action"`
	Params interface{} `json:"params"`
	Echo   string      `json:"echo"`
}

Jump to

Keyboard shortcuts

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