From d801144ffdb32945b8d96dd0f1095a2ba0b886fd Mon Sep 17 00:00:00 2001 From: chr_ Date: Wed, 23 Nov 2022 17:43:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=94=99=E8=AF=AF=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ASFEnhance/ASFEnhance.cs | 5 +++-- ASFEnhance/AssemblyInfo.cs | 4 ++-- ASFEnhance/Utils.cs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ASFEnhance/ASFEnhance.cs b/ASFEnhance/ASFEnhance.cs index baef1423..98cb794b 100644 --- a/ASFEnhance/ASFEnhance.cs +++ b/ASFEnhance/ASFEnhance.cs @@ -21,7 +21,7 @@ internal sealed class ASFEnhance : IASF, IBotCommand2 public Version Version => MyVersion; [JsonProperty] - public static PluginConfig Config => Utils.Config; + public static PluginConfig Config { get; internal set; } /// /// ASF启动事件 @@ -32,6 +32,7 @@ public Task OnASFInit(IReadOnlyDictionary? additionalConfigPrope { if (additionalConfigProperties == null) { + Config = new(); return Task.CompletedTask; } @@ -66,7 +67,7 @@ public Task OnASFInit(IReadOnlyDictionary? additionalConfigPrope } } - Utils.Config = config != null ? config : new(); + Config = config ?? new(); if (Config.DevFeature) { diff --git a/ASFEnhance/AssemblyInfo.cs b/ASFEnhance/AssemblyInfo.cs index 535fbbe4..1df2339d 100644 --- a/ASFEnhance/AssemblyInfo.cs +++ b/ASFEnhance/AssemblyInfo.cs @@ -1,8 +1,8 @@ using System.Reflection; [assembly: CLSCompliant(false)] -[assembly: AssemblyVersion("1.6.19.3")] -[assembly: AssemblyFileVersion("1.6.19.3")] +[assembly: AssemblyVersion("1.6.19.4")] +[assembly: AssemblyFileVersion("1.6.19.4")] [assembly: AssemblyCopyright("Copyright © 2022 Chr_")] [assembly: AssemblyProduct("ASFEnhance")] diff --git a/ASFEnhance/Utils.cs b/ASFEnhance/Utils.cs index f9fa5f08..169a59c9 100644 --- a/ASFEnhance/Utils.cs +++ b/ASFEnhance/Utils.cs @@ -12,7 +12,7 @@ internal static class Utils /// /// 插件配置 /// - internal static PluginConfig Config { get; set; } + internal static PluginConfig Config => ASFEnhance.Config; /// /// 更新已就绪