Versions in this module Expand all Collapse all v0 v0.0.1 Sep 25, 2020 Changes in this version + const Paper + const Rock + const Scissors + var CommandPrefix = "/" + var StrictCommand = false + func Command(str string) (cmd string, args []string) + func DecodeCQCodeText(str string) string + func DecodeCQText(str string) string + func EncodeCQCodeText(str string) string + func EncodeCQText(str string) string + func FormatCQCode(media Media) string + func IsCommand(str string) bool + func ParseCQCode(str string, media Media) error + type At struct + QQ string + func (a *At) FunctionName() string + type Bface struct + BfaceID int + func (b *Bface) FunctionName() string + type Dice struct + Type int + func (d *Dice) FunctionName() string + type Emoji struct + EmojiID int + func (e *Emoji) FunctionName() string + type Face struct + FaceID int + func NewFaceFromName(str string) (*Face, error) + func (f *Face) FunctionName() string + func (f *Face) Name() (string, error) + type Image struct + FileID string + URL string + func (i *Image) FunctionName() string + type Location struct + Content string + Latitude float64 + Longitude float64 + Style int + Title string + func (l *Location) FunctionName() string + type Media interface + FunctionName func() string + type Message []Media + func NewMessage() Message + func ParseMessage(msg interface{}) (Message, error) + func ParseMessageFromArray(msg interface{}) (Message, error) + func ParseMessageFromMessageSegments(segs []MessageSegment) Message + func ParseMessageFromString(str string) (Message, error) + func (m *Message) Append(media Media) error + func (m *Message) CQString() string + func (m *Message) Command() (cmd string, args []string) + func (m *Message) IsCommand() bool + func (m *Message) MessageSegments() []MessageSegment + type MessageSegment struct + Data map[string]interface{} + Type string + func NewMessageSegment(media Media) (MessageSegment, error) + func NewMessageSegmentFromCQCode(str string) (MessageSegment, error) + func ParseMessageSegments(msg interface{}) ([]MessageSegment, error) + func ParseMessageSegmentsFromArray(msg interface{}) ([]MessageSegment, error) + func ParseMessageSegmentsFromString(str string) ([]MessageSegment, error) + func (seg *MessageSegment) CQString() string + func (seg *MessageSegment) FunctionName() string + func (seg *MessageSegment) ParseMedia(media Media) error + type Music struct + AudioURL string + Content string + Image string + MusicID string + ShareURL string + Title string + Type string + func (m *Music) FunctionName() string + func (m *Music) IsCustomMusic() bool + type Record struct + FileID string + Magic bool + URL string + func (r *Record) FunctionName() string + type RedPack struct + Title string + func (rp *RedPack) FunctionName() string + type Rich struct + func (r *Rich) FunctionName() string + type Rps struct + Type int + func (rps *Rps) FunctionName() string + type Sface struct + SfaceID int + func (s *Sface) FunctionName() string + type Shake struct + func (s *Shake) FunctionName() string + type Share struct + Content string + Image string + Title string + URL string + func (s *Share) FunctionName() string + type Show struct + ID int + func (s *Show) FunctionName() string + type Sign struct + Image string + Location string + Title string + func (s *Sign) FunctionName() string + type Text struct + Text string + func (t *Text) FunctionName() string