mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Many IDisposable fixes. GlobalNadeko won't have file watchers for creds. Wallet simplified
This commit is contained in:
@@ -32,6 +32,7 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
||||
|
||||
|
||||
private readonly object _reloadLock = new();
|
||||
private readonly IDisposable _changeToken;
|
||||
|
||||
public BotCredsProvider(int? totalShards = null)
|
||||
{
|
||||
@@ -52,9 +53,9 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
||||
_config = new ConfigurationBuilder().AddYamlFile(CredsPath, false, true)
|
||||
.AddEnvironmentVariables("NadekoBot_")
|
||||
.Build();
|
||||
|
||||
ChangeToken.OnChange(() => _config.GetReloadToken(), Reload);
|
||||
|
||||
#if !GLOBAL_NADEKO
|
||||
_changeToken = ChangeToken.OnChange(() => _config.GetReloadToken(), Reload);
|
||||
#endif
|
||||
Reload();
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,7 @@ using System.Diagnostics;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
|
||||
public class StatsService : IStatsService, IReadyExecutor, INService, IDisposable
|
||||
public sealed class StatsService : IStatsService, IReadyExecutor, INService, IDisposable
|
||||
{
|
||||
public const string BOT_VERSION = "4.0.4";
|
||||
|
||||
|
Reference in New Issue
Block a user