add video command body
This commit is contained in:
@@ -28,6 +28,8 @@ func selectAct(cmd, sub, txt string, s *lineobj.SourceObject) (res string) {
|
||||
return delTwitchChannel(sub, txt, s)
|
||||
case "image":
|
||||
return fmt.Sprintf("$image$%s", sub)
|
||||
case "video":
|
||||
return fmt.Sprintf("$video$%s", sub)
|
||||
case "addyoutube":
|
||||
return addYoutubeChannel(sub, txt, s)
|
||||
case "delyoutube":
|
||||
|
||||
@@ -79,6 +79,13 @@ func parseResult(str string) interface{} {
|
||||
OriginalContentURL: strs[0],
|
||||
PreviewImageURL: strs[1],
|
||||
}
|
||||
} else if strings.HasPrefix(str, "$video$") {
|
||||
str = strings.Replace(str, "$video$", "", 1)
|
||||
strs := strings.Split(str, ";")
|
||||
m = &line.VideoMessage{
|
||||
OriginalContentURL: strs[0],
|
||||
PreviewImageURL: strs[1],
|
||||
}
|
||||
} else {
|
||||
m = &line.TextMessage{
|
||||
Text: str,
|
||||
|
||||
Reference in New Issue
Block a user