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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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