mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-21 07:10:07 +08:00
✨ 完善加载配置
This commit is contained in:
parent
60c29b2d12
commit
3005ee5b02
@ -403,12 +403,13 @@ func loadConfig() {
|
|||||||
data, err1 := io.ReadAll(f)
|
data, err1 := io.ReadAll(f)
|
||||||
if err1 == nil {
|
if err1 == nil {
|
||||||
if len(data) > 0 {
|
if len(data) > 0 {
|
||||||
config.Unmarshal(data)
|
if config.Unmarshal(data) == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
config.Checkin = make(map[uint64]bool)
|
config.Checkin = make(map[uint64]bool)
|
||||||
config.Welcome = make(map[uint64]string)
|
config.Welcome = make(map[uint64]string)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user