coolq

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: MIT Imports: 25 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToGlobalId

func ToGlobalId(code int64, msgId int32) int32

func ToStringMessage

func ToStringMessage(e []message.IMessageElement, code int64, raw ...bool) (r string)

Types

type CQBot

type CQBot struct {
	Client *client.QQClient
	// contains filtered or unexported fields
}

func NewQQBot

func NewQQBot(cli *client.QQClient, conf *global.JsonConfig) *CQBot

func (*CQBot) CQCanSendImage

func (bot *CQBot) CQCanSendImage() MSG

func (*CQBot) CQCanSendRecord

func (bot *CQBot) CQCanSendRecord() MSG

func (*CQBot) CQGetForwardMessage added in v0.9.3

func (bot *CQBot) CQGetForwardMessage(resId string) MSG

func (*CQBot) CQGetGroupMessage

func (bot *CQBot) CQGetGroupMessage(messageId int32) MSG

func (*CQBot) CQGetImage

func (bot *CQBot) CQGetImage(file string) MSG

func (*CQBot) CQGetStatus

func (bot *CQBot) CQGetStatus() MSG

func (*CQBot) CQGetVersionInfo

func (bot *CQBot) CQGetVersionInfo() MSG

func (*CQBot) CQSendGroupForwardMessage added in v0.9.4

func (bot *CQBot) CQSendGroupForwardMessage(groupId int64, m gjson.Result) MSG

func (*CQBot) CQSetGroupName

func (bot *CQBot) CQSetGroupName(groupId int64, name string) MSG

func (*CQBot) ConvertObjectMessage added in v0.9.4

func (bot *CQBot) ConvertObjectMessage(m gjson.Result, group bool) (r []message.IMessageElement)

func (*CQBot) ConvertStringMessage

func (bot *CQBot) ConvertStringMessage(m string, group bool) (r []message.IMessageElement)

func (*CQBot) GetGroupMessage

func (bot *CQBot) GetGroupMessage(mid int32) MSG

func (*CQBot) InsertGroupMessage

func (bot *CQBot) InsertGroupMessage(m *message.GroupMessage) int32

func (*CQBot) OnEventPush

func (bot *CQBot) OnEventPush(f func(m MSG))

func (*CQBot) Release

func (bot *CQBot) Release()

func (*CQBot) SendGroupMessage

func (bot *CQBot) SendGroupMessage(groupId int64, m *message.SendingMessage) int32

func (*CQBot) SendPrivateMessage

func (bot *CQBot) SendPrivateMessage(target int64, m *message.SendingMessage) int32

func (*CQBot) ToElement

func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.IMessageElement, error)

type MSG

type MSG map[string]interface{}

func Failed

func Failed(code int) MSG

func OK

func OK(data interface{}) MSG

func (MSG) ToJson

func (m MSG) ToJson() string

Jump to

Keyboard shortcuts

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