You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A message struct contains multiple message segments.
typeMessagestruct{
// UID of sender.SenderIDstring// UID of the bot.SelfIDstring// Whether it is a group message.IsGroupbool// If the message contains @at_botIsToMebool// Group IDGroupIDbool// Message segmentsSegments []MessageSegment
}
Message segments
Message segments have some types: text,image,video,sound,action.
typeMessageSegmentsstruct{
// Type: text,image,video,sound,action.Typestring// Content of the message.Contentstring
}
Utils
getText() will return all the text content in string. getImageSegs()getVideoSegs()getSoundSegs()getActionSegs() will return all the corresponding segments in array.
addTextSeg()addImageSeg()addVideoSeg()addSoundSeg()addActionSeg() will add all the corresponding segments.