From 6fdab062abe607abdf4bb12b15b0660301fc460d Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Wed, 6 Oct 2021 21:01:36 +0800 Subject: [PATCH] update --- im/tg/tg.go | 1 + 1 file changed, 1 insertion(+) diff --git a/im/tg/tg.go b/im/tg/tg.go index a549f05..124e79d 100644 --- a/im/tg/tg.go +++ b/im/tg/tg.go @@ -58,6 +58,7 @@ func init() { } core.GroupPushs["tg"] = func(i, j int, s string) { paths := []string{} + for _, v := range regexp.MustCompile(`\[CQ:image,file=([^\[\]]+)\]`).FindAllStringSubmatch(s, -1) { paths = append(paths, core.ExecPath+"/data/images/"+v[1]) s = strings.Replace(s, fmt.Sprintf(`[CQ:image,file=%s]`, v[1]), "", -1)