Skip to content

Commit 4904a10

Browse files
author
RikaCelery
committed
fix: won't panic on config reload error
1 parent ca637b7 commit 4904a10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre_works.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func flushMainConfig(configPath string, configFileName string) error {
177177
for _, sid := range viper.GetStringSlice("superuser") {
178178
id, err := strconv.ParseInt(sid, 10, 64)
179179
if err != nil {
180-
panic(err)
180+
log.Warnln("读取更新的超级用户出错", err)
181181
}
182182
zero.BotConfig.SuperUsers = append(zero.BotConfig.SuperUsers, id)
183183
}

0 commit comments

Comments
 (0)