Documentation
¶
Index ¶
- Variables
- type At
- type CommonFile
- type Face
- type Image
- type Message
- type MessageChain
- func (m MessageChain) Append(msg Message) MessageChain
- func (m MessageChain) At(qq string) MessageChain
- func (m MessageChain) Br() MessageChain
- func (m MessageChain) Face(id string) MessageChain
- func (m MessageChain) File(file string) MessageChain
- func (m MessageChain) Image(file string) MessageChain
- func (m MessageChain) Record(file string) MessageChain
- func (m MessageChain) Reply(id int) MessageChain
- func (m MessageChain) Text(text string) MessageChain
- type Record
- type Reply
- type Sender
- type Text
Constants ¶
This section is empty.
Variables ¶
var ErrNetWork = errors.New("network error")
Functions ¶
This section is empty.
Types ¶
type CommonFile ¶
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 ¶
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 ¶
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"`
}