schema

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: Unlicense Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNetWork = errors.New("network error")

Functions

This section is empty.

Types

type At

type At struct {
	QQ string `json:"qq"`
}

type CommonFile

type CommonFile struct {
	File string `json:"file"`
	Url  string `json:"url,omitzero"`
	Path string `json:"path,omitzero"`

	FileID     string `json:"file_id,omitzero"`
	FileSize   string `json:"file_size,omitzero"`
	FileUnique string `json:"file_unique,omitzero"`
}

type Face

type Face struct {
	Id string `json:"id"`
}

type Image

type Image struct {
	CommonFile
	Type    string `json:"type,omitzero"`
	Summary string `json:"summary,omitzero"`
	SubType int    `json:"sub_type,omitzero"`
	// contains filtered or unexported fields
}

func (*Image) Decode

func (i *Image) Decode(noTls bool) (image.Image, error)

In Go 1.22 RSA key exchange based cipher suites were removed from the default list, but can be re-added with the GODEBUG setting tlsrsakex=1 or use noTls to get qq image Type() or Decode() Decode to image.Image ! For qq image set GODEBUG setting tlsrsakex=1 or use noTls=true

func (*Image) RealType

func (i *Image) RealType(noTls bool) (string, error)

In Go 1.22 RSA key exchange based cipher suites were removed from the default list, but can be re-added with the GODEBUG setting tlsrsakex=1 or use noTls to get qq image Type() or Decode() Type returns the image real type.! For qq image set GODEBUG setting tlsrsakex=1 or use noTls=true

type Message

type Message struct {
	Type string          `json:"type"`
	Data json.RawMessage `json:"data"`
}

type MessageChain added in v0.3.0

type MessageChain []Message

func (MessageChain) Append added in v0.3.0

func (m MessageChain) Append(msg Message) MessageChain

func (MessageChain) At added in v0.3.0

func (m MessageChain) At(qq string) MessageChain

func (MessageChain) Br added in v0.3.0

func (m MessageChain) Br() MessageChain

func (MessageChain) Face added in v0.3.0

func (m MessageChain) Face(id string) MessageChain

func (MessageChain) File added in v0.3.0

func (m MessageChain) File(file string) MessageChain

such as: network URL: https://www.example.com/image.png local file:///C:\\Users\Richard\Pictures\1.png see rfc 8089

func (MessageChain) Image added in v0.3.0

func (m MessageChain) Image(file string) MessageChain

such as: network URL: https://www.example.com/image.png local file:///C:\\Users\Richard\Pictures\1.png see rfc 8089 base64: base64://9j/4AAQSkZJRgABAQEAAAAAAAD/...

func (MessageChain) Record added in v0.3.0

func (m MessageChain) Record(file string) MessageChain

func (MessageChain) Reply added in v0.3.0

func (m MessageChain) Reply(id int) MessageChain

func (MessageChain) Text added in v0.3.0

func (m MessageChain) Text(text string) MessageChain

type Record

type Record struct {
	CommonFile
	// The magic field is generally not implemented (even in go-cqhttp) because there is insufficient demand
	Magic bool `json:"magic"`
}

type Reply

type Reply struct {
	Id int `json:"id"`
}

type Sender

type Sender struct {
	UserID   int64  `json:"user_id"`
	Nickname string `json:"nickname"`
	Sex      string `json:"sex"`
	Age      int    `json:"age"`
}

type Text

type Text struct {
	Text string `json:"text"`
}

func (Text) Cmd

func (t Text) Cmd(prefix string) (string, error)

func (Text) CmdIndex

func (t Text) CmdIndex(prefix string, index int) (string, error)

func (Text) CmdKey

func (t Text) CmdKey(key string) (string, error)

Jump to

Keyboard shortcuts

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