1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 19:43:49 +08:00
This commit is contained in:
Mrs4s 2020-08-06 00:09:44 +08:00
parent 053d62ff4a
commit 2dca0a3e9f

View File

@ -197,6 +197,9 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
if err != nil {
return nil, err
}
if path.Ext(path.Join(global.IMAGE_PATH, f)) != ".image" {
return message.NewImage(b), nil
}
if len(b) < 20 {
return nil, errors.New("invalid local file")
}