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 {