This commit is contained in:
cdle
2021-10-19 22:43:05 +08:00
parent 852665999e
commit e797ce1c74
10 changed files with 35 additions and 20 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ func init() {
}
for _, v := range regexp.MustCompile(`\[CQ:image,file=([^\[\]]+)\]`).FindAllStringSubmatch(s, -1) {
s = strings.Replace(s, fmt.Sprintf(`[CQ:image,file=%s]`, v[1]), "", -1)
data, err := os.ReadFile(core.ExecPath + "/data/images/" + v[1])
data, err := os.ReadFile("data/images/" + v[1])
if err == nil {
add := regexp.MustCompile("(https.*)").FindString(string(data))
if add != "" {