🐛 fix: fortune dlmu

This commit is contained in:
fumiama 2022-01-12 12:11:14 +08:00
parent ce1e85e0a3
commit d3fafa7b9a

View File

@ -90,6 +90,7 @@ func init() {
err := file.DownloadTo(site+"运势签文.json", mikuji, false)
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))
dlmu.Unlock()
return
}
ctx.SendChain(message.Text("下载签文文件完毕"))
@ -105,6 +106,7 @@ func init() {
err := file.DownloadTo(site+"sakura.ttf", ttf, false)
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))
dlmu.Unlock()
return
}
ctx.SendChain(message.Text("下载字体文件完毕"))
@ -137,12 +139,14 @@ func init() {
err := file.DownloadTo(site+zipfile, zipcache, false)
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))
dlmu.Unlock()
return
}
ctx.SendChain(message.Text("下载背景图片完毕"))
err = unpack(zipcache, folder+"/")
if err != nil {
ctx.SendChain(message.Text("ERROR: ", err))
dlmu.Unlock()
return
}
ctx.SendChain(message.Text("解压背景图片完毕"))