From 2dca0a3e9f976dfa8836d4697688c289939cbaf8 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Thu, 6 Aug 2020 00:09:44 +0800 Subject: [PATCH] fix #35 --- coolq/cqcode.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coolq/cqcode.go b/coolq/cqcode.go index 34835d0..cca5287 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -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") }