edit README

This commit is contained in:
源文雨
2022-12-26 13:11:38 +08:00
parent 19e3688499
commit 7d1a4b4005
7 changed files with 19 additions and 5 deletions

View File

@@ -81,6 +81,10 @@ func init() {
ctx.SendChain(message.Text("ERROR: ", err))
return
}
if len(illust.ImageUrls) == 0 {
ctx.SendChain(message.Text("ERROR: nil image url"))
return
}
u := illust.ImageUrls[0]
n := u[strings.LastIndex(u, "/")+1 : len(u)-4]
f := illust.Path(0)