Skip to content

Commit

Permalink
fix 错误修正
Browse files Browse the repository at this point in the history
  • Loading branch information
chr233 committed Nov 23, 2022
1 parent 449bbff commit d801144
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions ASFEnhance/ASFEnhance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

/// <summary>
/// ASF启动事件
Expand All @@ -32,6 +32,7 @@ public Task OnASFInit(IReadOnlyDictionary<string, JToken>? additionalConfigPrope
{
if (additionalConfigProperties == null)
{
Config = new();
return Task.CompletedTask;
}

Expand Down Expand Up @@ -66,7 +67,7 @@ public Task OnASFInit(IReadOnlyDictionary<string, JToken>? additionalConfigPrope
}
}

Utils.Config = config != null ? config : new();
Config = config ?? new();

if (Config.DevFeature)
{
Expand Down
4 changes: 2 additions & 2 deletions ASFEnhance/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion ASFEnhance/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal static class Utils
/// <summary>
/// 插件配置
/// </summary>
internal static PluginConfig Config { get; set; }
internal static PluginConfig Config => ASFEnhance.Config;

/// <summary>
/// 更新已就绪
Expand Down

0 comments on commit d801144

Please sign in to comment.