1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00
This commit is contained in:
Mrs4s 2020-08-08 08:06:24 +08:00
parent 61f103ac1d
commit fa5ee669f4

View File

@ -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 {