mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 19:43:49 +08:00
fix #35
This commit is contained in:
parent
053d62ff4a
commit
2dca0a3e9f
@ -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")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user