mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
修复猜歌插件创建config.json错误 (#296)
This commit is contained in:
parent
b32c86863e
commit
16ff1975ff
@ -329,7 +329,7 @@ func init() { // 插件主体
|
||||
}
|
||||
|
||||
func saveConfig(cfgFile string) (err error) {
|
||||
if reader, err := os.OpenFile(cfgFile, os.O_CREATE, os.ModePerm); err == nil {
|
||||
if reader, err := os.Create(cfgFile); err == nil {
|
||||
err = json.NewEncoder(reader).Encode(&cfg)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user