cqhttp_default_driver

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: AGPL-3.0 Imports: 13 Imported by: 1

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
}

func (*Bot) CallApi

func (b *Bot) CallApi(action string, param interface{}) 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

func (*Bot) SendPrivateMsg

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

type Driver

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

func NewDriver

func NewDriver() *Driver

func (*Driver) AddWebHook

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{}

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

func (*Driver) SetConfig

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

func (*Driver) SetToken

func (d *Driver) SetToken(token string)

Jump to

Keyboard shortcuts

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