From fa5ee669f403fe44e5fee30ecf173ba52fa94d12 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Sat, 8 Aug 2020 08:06:24 +0800 Subject: [PATCH] update. --- coolq/cqcode.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coolq/cqcode.go b/coolq/cqcode.go index 091f924..199822f 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -194,6 +194,9 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message. return message.NewImage(b), nil } rawPath := path.Join(global.IMAGE_PATH, f) + if !global.PathExists(rawPath) && global.PathExists(rawPath+".cqimg") { + rawPath += ".cqimg" + } if global.PathExists(rawPath) { b, err := ioutil.ReadFile(rawPath) if err != nil {