Skip to content

Commit 3cdaff5

Browse files
authored
更新 main.go
1 parent fe84435 commit 3cdaff5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

plugin/wife/main.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@ var (
2828

2929
getJSON = fcext.DoOnceOnSuccess(
3030
func(ctx *zero.Ctx) bool {
31-
// 1. 优先尝试从镜像站更新同步
3231
data, err := engine.GetLazyData("wife.json", true)
3332
if err != nil {
34-
// 2. 如果下载失败(如 MD5 不匹配),尝试直接读取本地已有文件
3533
logrus.Warnf("[wife] 远程同步 wife.json 失败: %v,正在尝试读取本地缓存...", err)
3634
data, err = engine.GetLazyData("wife.json", false)
3735
if err != nil {
38-
// 3. 本地也没有或读取失败才彻底报错
3936
ctx.SendChain(message.Text("ERROR: 无法获取老婆库数据(同步及本地读取均失败): ", err))
4037
return false
4138
}
@@ -65,7 +62,6 @@ func init() {
6562
engine.OnFullMatch("抽老婆", getJSON).SetBlock(true).
6663
Handle(func(ctx *zero.Ctx) {
6764
card := cards[fcext.RandSenderPerDayN(ctx.Event.UserID, len(cards))]
68-
// 图片获取同样可以考虑增加非强制下载逻辑,但通常图片 MD5 报错较少
6965
data, err := engine.GetLazyData("wives/"+card, true)
7066
var msgText string
7167
work, name := card2name(card)

0 commit comments

Comments
 (0)