cqhttp_reverse_ws_driver

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: AGPL-3.0 Imports: 12 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
}

Bot @Description: bot实例对象

func (*Bot) CallApi

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

func (*Bot) Do

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

Do *

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

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

func (b *Bot) SendGroupMsg(groupID int64, message interface{}) int32

func (*Bot) SendPrivateMsg

func (b *Bot) SendPrivateMsg(userID int64, message interface{}) int32

type Driver

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

Driver @Description:

func NewDriver

func NewDriver(address, token string) *Driver

NewDriver *

  • @Description:
  • @return *Driver

func (*Driver) GetBot

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

GetBot *

  • @Description:
  • @receiver d
  • @param i
  • @return 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

GetEvent *

  • @Description:
  • @receiver d
  • @return chan

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

Run *

  • @Description:
  • @receiver d

func (*Driver) ServeHTTP

func (d *Driver) ServeHTTP(writer http.ResponseWriter, request *http.Request)

ServeHTTP *

  • @Description:
  • @receiver d
  • @param writer
  • @param request
  • example

Jump to

Keyboard shortcuts

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