diff --git a/ASFFreeGames/ASFFreeGamesPlugin.cs b/ASFFreeGames/ASFFreeGamesPlugin.cs index a9e5b99..3493d2c 100644 --- a/ASFFreeGames/ASFFreeGamesPlugin.cs +++ b/ASFFreeGames/ASFFreeGamesPlugin.cs @@ -31,7 +31,7 @@ internal sealed class ASFFreeGamesPlugin : IASF, IBot, IBotConnection, IBotComma private const int CollectGamesTimeout = 3 * 60 * 1000; internal static PluginContext Context { - get => _context.Value; + get => _context.Value ?? new PluginContext(Array.Empty(), new ContextRegistry(), new ASFFreeGamesOptions(), new LoggerFilter()); private set => _context.Value = value; } @@ -169,6 +169,7 @@ private async Task RemoveBot(Bot bot) { LoggerFilter.RemoveFilters(bot); } + // ReSharper disable once UnusedMethodReturnValue.Local private async Task SaveOptions(CancellationToken cancellationToken) { if (!cancellationToken.IsCancellationRequested) { const string cmd = $"FREEGAMES {FreeGamesCommand.SaveOptionsInternalCommandString}";