mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-06 20:13:50 +08:00
fix #61.
This commit is contained in:
parent
a38c74a767
commit
8449770b6d
@ -200,6 +200,9 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
|
|||||||
if !global.PathExists(rawPath) && global.PathExists(rawPath+".cqimg") {
|
if !global.PathExists(rawPath) && global.PathExists(rawPath+".cqimg") {
|
||||||
rawPath += ".cqimg"
|
rawPath += ".cqimg"
|
||||||
}
|
}
|
||||||
|
if !global.PathExists(rawPath) && d["url"] != "" {
|
||||||
|
return bot.ToElement(t, map[string]string{"file": d["url"]}, group)
|
||||||
|
}
|
||||||
if global.PathExists(rawPath) {
|
if global.PathExists(rawPath) {
|
||||||
b, err := ioutil.ReadFile(rawPath)
|
b, err := ioutil.ReadFile(rawPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user