🐛 修复添加图片无法正常发出图片

This commit is contained in:
Yiwen-Chan 2021-03-19 23:09:06 +08:00
parent 4b4335f6eb
commit 12576ed401

View File

@ -103,7 +103,6 @@ func init() { // 插件主体
type_ = ctx.State["regex_matched"].([]string)[1]
id = utils.Str2Int(ctx.State["regex_matched"].([]string)[2])
illust = &utils.Illust{}
file = fmt.Sprintf("%s%d.jpg", PoolsCache.Path, illust.Pid)
)
ctx.Send("少女祈祷中......")
// TODO 查询P站插图信息
@ -117,6 +116,7 @@ func init() { // 插件主体
ctx.Send(fmt.Sprintf("ERROR: %v", err))
return
}
file := fmt.Sprintf("%s%d.jpg", PoolsCache.Path, illust.Pid)
if id := ctx.Send(illust.DetailPic(file)); id == 0 {
ctx.Send(fmt.Sprintf("ERROR: %v", "可能被风控,发送失败"))
return