mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-08 04:55:55 +08:00
fix image error.
This commit is contained in:
parent
0894f2ac44
commit
0e7c30e854
@ -367,12 +367,18 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
|
||||
if group {
|
||||
rsp, err := bot.Client.QueryGroupImage(1, hash, size)
|
||||
if err != nil {
|
||||
if url != "" {
|
||||
return bot.ToElement(t, map[string]string{"file": url}, group)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
rsp, err := bot.Client.QueryFriendImage(1, hash, size)
|
||||
if err != nil {
|
||||
if url != "" {
|
||||
return bot.ToElement(t, map[string]string{"file": url}, group)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user