cqhttp_default_driver

package
v0.0.0-...-dddcec1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: AGPL-3.0 Imports: 17 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 {
	CQBot *coolq.CQBot
	// contains filtered or unexported fields
}

Bot @Description: Bot对象

func (*Bot) CallApi

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

CallApi

@Description:
* @receiver b
* @param action
* @param param
* @return gjson.Result

func (*Bot) Do

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

func (*Bot) GetResponse

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

func (*Bot) GetSelfId

func (b *Bot) GetSelfId() int64

func (*Bot) SendGroupMsg

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

SendGroupMsg

@Description:
* @receiver b
* @param groupID
* @param message
* @return int32

func (*Bot) SendPrivateMsg

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

SendPrivateMsg

@Description:
* @receiver b
* @param userID
* @param message
* @return int32

type Driver

type Driver struct {
	coolq.CQBot
	EventChan chan []byte
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver() *Driver

func (*Driver) GetBot

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

func (*Driver) GetBots

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

func (*Driver) GetEvent

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

func (*Driver) OnConnect

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

func (*Driver) OnDisConnect

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

func (*Driver) Run

func (d *Driver) Run()

Jump to

Keyboard shortcuts

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