Versions in this module Expand all Collapse all v0 v0.0.1 Dec 21, 2022 Changes in this version + const CloudMusic + const KugouMusic + const KuwoMusic + const MaxMessageSize + const MiguMusic + const QQMusic + func EstimateLength(elems []IMessageElement) int + func FaceNameById(id int) string + func ToProtoElems(elems []IMessageElement, generalFlags bool) (r []*msg.Elem) + func ToReadableString(m []IMessageElement) string + func ToSrcProtoElems(elems []IMessageElement) []*msg.Elem + type AnimatedSticker struct + ID int32 + Name string + func (e *AnimatedSticker) Pack() []*msg.Elem + func (e *AnimatedSticker) Type() ElementType + type AnonymousInfo struct + AnonymousId string + AnonymousNick string + type AtElement struct + Display string + SubType AtType + Target int64 + func AtAll() *AtElement + func NewAt(target int64, display ...string) *AtElement + func (e *AtElement) Pack() (r []*msg.Elem) + func (e *AtElement) Type() ElementType + type AtType int + type DiceElement struct + Value int32 + type ElementType int + const At + const Face + const File + const Forward + const Image + const LightApp + const RedBag + const Reply + const Service + const Text + const Video + const Voice + func (i ElementType) String() string + type FaceElement struct + Index int32 + Name string + func NewFace(index int32) *FaceElement + func (e *FaceElement) Pack() (r []*msg.Elem) + func (e *FaceElement) Type() ElementType + type FingerGuessingElement struct + Name string + Value int32 + type ForwardElement struct + Content string + FileName string + Items []*msg.PbMultiMsgItem + ResId string + func (e *ForwardElement) Pack() []*msg.Elem + func (e *ForwardElement) Type() ElementType + type ForwardMessage struct + Nodes []*ForwardNode + func NewForwardMessage() *ForwardMessage + func (f *ForwardMessage) AddNode(node *ForwardNode) *ForwardMessage + func (f *ForwardMessage) Brief() string + func (f *ForwardMessage) CalculateValidationData(seq, random int32, groupCode int64) ([]byte, []byte) + func (f *ForwardMessage) Length() int + func (f *ForwardMessage) PackForwardMessage(seq int32, random int32, groupCode int64) []*msg.Message + func (f *ForwardMessage) Preview() string + func (f *ForwardMessage) Type() ElementType + type ForwardNode struct + GroupId int64 + Message []IMessageElement + SenderId int64 + SenderName string + Time int32 + type FriendImageElement struct + Flash bool + ImageId string + Md5 []byte + Size int32 + Url string + func (e *FriendImageElement) Pack() []*msg.Elem + func (e *FriendImageElement) Type() ElementType + type GroupFileElement struct + Busid int32 + Name string + Path string + Size int64 + func (e *GroupFileElement) Type() ElementType + type GroupImageElement struct + EffectID int32 + FileId int64 + Flash bool + Height int32 + ImageBizType ImageBizType + ImageId string + ImageType int32 + Md5 []byte + Size int32 + Url string + Width int32 + func NewGroupImage(id string, md5 []byte, fid int64, size, width, height, imageType int32) *GroupImageElement + func (e *GroupImageElement) Pack() (r []*msg.Elem) + func (e *GroupImageElement) Type() ElementType + type GroupMessage struct + Elements []IMessageElement + GroupCode int64 + GroupName string + Id int32 + InternalId int32 + OriginalObject *msg.Message + Sender *Sender + Time int32 + func (msg *GroupMessage) ToString() (res string) + type GroupVoiceElement struct + Data []byte + Ptt *msg.Ptt + func (e *GroupVoiceElement) Type() ElementType + type GuildChannelMessage struct + ChannelId uint64 + Elements []IMessageElement + GuildId uint64 + Id uint64 + InternalId uint64 + Reactions []*GuildMessageEmojiReaction + Sender *GuildSender + Time int64 + type GuildImageElement struct + DownloadIndex string + FileId int64 + FilePath string + Height int32 + ImageType int32 + Md5 []byte + Size int32 + Url string + Width int32 + func (e *GuildImageElement) Pack() (r []*msg.Elem) + func (e *GuildImageElement) Type() ElementType + type GuildMessageEmojiReaction struct + Clicked bool + Count int32 + EmojiId string + EmojiType uint64 + Face *FaceElement + type GuildSender struct + Nickname string + TinyId uint64 + type IMessageElement interface + Type func() ElementType + func NewDice(value int32) IMessageElement + func NewFingerGuessing(value int32) IMessageElement + func ParseMessageElems(elems []*msg.Elem) []IMessageElement + type IRichMessageElement interface + Pack func() []*msg.Elem + type ImageBizType uint32 + const CustomFaceImage + const DouImage + const HotImage + const HotSearchImage + const RelatedEmoImage + const SelfieImage + const StickerAdImage + const StickerImage + const UnknownBizType + const ZhiTuImage + type LightAppElement struct + Content string + func NewLightApp(content string) *LightAppElement + func (e *LightAppElement) Pack() (r []*msg.Elem) + func (e *LightAppElement) Type() ElementType + type MarketFaceElement struct + EncryptKey []byte + FaceId []byte + ItemType int32 + MagicValue string + MediaType int32 + Name string + SubType int32 + TabId int32 + func (e *MarketFaceElement) Pack() []*msg.Elem + func (e *MarketFaceElement) Type() ElementType + type MusicShareElement struct + Brief string + MusicType int + MusicUrl string + PictureUrl string + Summary string + Title string + Url string + func (e *MusicShareElement) Type() ElementType + type PrivateMessage struct + Elements []IMessageElement + Id int32 + InternalId int32 + Self int64 + Sender *Sender + Target int64 + Time int32 + func (msg *PrivateMessage) ToString() (res string) + type PrivateVoiceElement = GroupVoiceElement + type RedBagElement struct + MsgType RedBagMessageType + Title string + func (e *RedBagElement) Type() ElementType + type RedBagMessageType int + const AtTypeGroupMember + const AtTypeGuildChannel + const AtTypeGuildMember + const RedBagDraw + const RedBagDrawMultiModel + const RedBagEmoji + const RedBagH5 + const RedBagH5Common + const RedBagKSong + const RedBagKeyword + const RedBagLook + const RedBagLucky + const RedBagLuckySpecify + const RedBagLuckySpecifyOver3 + const RedBagLuckyTheme + const RedBagSimple + const RedBagSimpleSpecify + const RedBagSimpleSpecifyOver3 + const RedBagSimpleTheme + const RedBagVoice + const RedBagVoiceC2C + const RedBagWord + const RedBagWordChain + type ReplyElement struct + Elements []IMessageElement + GroupID int64 + ReplySeq int32 + Sender int64 + Time int32 + func NewPrivateReply(m *PrivateMessage) *ReplyElement + func NewReply(m *GroupMessage) *ReplyElement + func (e *ReplyElement) Type() ElementType + type Sender struct + AnonymousInfo *AnonymousInfo + CardName string + IsFriend bool + Nickname string + Uin int64 + func (s *Sender) DisplayName() string + func (s *Sender) IsAnonymous() bool + type SendingMessage struct + Elements []IMessageElement + func NewSendingMessage() *SendingMessage + func SplitLongMessage(sendingMessage *SendingMessage) []*SendingMessage + func (msg *SendingMessage) Any(filter func(e IMessageElement) bool) bool + func (msg *SendingMessage) Append(e IMessageElement) *SendingMessage + func (msg *SendingMessage) Count(filter func(e IMessageElement) bool) (c int) + func (msg *SendingMessage) FirstOrNil(filter func(e IMessageElement) bool) IMessageElement + func (msg *SendingMessage) ToFragmented() [][]IMessageElement + type ServiceElement struct + Content string + Id int32 + ResId string + SubType string + func NewRichJson(template string) *ServiceElement + func NewRichXml(template string, resID int64) *ServiceElement + func NewUrlShare(url, title, content, image string) *ServiceElement + func (e *ServiceElement) Pack() (r []*msg.Elem) + func (e *ServiceElement) Type() ElementType + type ShortVideoElement struct + Guild bool + Md5 []byte + Name string + Size int32 + ThumbMd5 []byte + ThumbSize int32 + Url string + Uuid []byte + func (e *ShortVideoElement) Pack() (r []*msg.Elem) + func (e *ShortVideoElement) Type() ElementType + type Source struct + PrimaryID int64 + SecondaryID int64 + SourceType SourceType + type SourceType byte + const SourceGroup + const SourceGuildChannel + const SourceGuildDirect + const SourcePrivate + func (t SourceType) String() string + type TempMessage struct + Elements []IMessageElement + GroupCode int64 + GroupName string + Id int32 + Self int64 + Sender *Sender + func (msg *TempMessage) ToString() (res string) + type TextElement struct + Content string + func NewText(s string) *TextElement + func (e *TextElement) Pack() (r []*msg.Elem) + func (e *TextElement) Type() ElementType + type VoiceElement struct + Data []byte + Md5 []byte + Name string + Size int32 + Url string + func (e *VoiceElement) Type() ElementType