From 28adb35ab9b6905eebcd83b6caa1b12d49b26be7 Mon Sep 17 00:00:00 2001 From: Rory& Date: Sun, 18 May 2025 22:52:21 +0200 Subject: Various bug fixes --- .../LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Utilities/LibMatrix.Utilities.Bot') diff --git a/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs b/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs index 4c6b462..d0a93a4 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Services/CommandListenerHostedService.cs @@ -25,7 +25,7 @@ public class CommandListenerHostedService( private FrozenSet _commands = null!; private Task? _listenerTask; - private CancellationTokenSource _cts = new(); + private readonly CancellationTokenSource _cts = new(); private long _startupTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); /// Triggered when the application host is ready to start the service. @@ -61,7 +61,6 @@ public class CommandListenerHostedService( Timeout = config.SyncConfiguration.Timeout ?? 30_000, MinimumDelay = config.SyncConfiguration.MinimumSyncTime ?? TimeSpan.Zero, SetPresence = config.SyncConfiguration.Presence ?? botConfig.Presence, - }; syncHelper.SyncReceivedHandlers.Add(async sync => { -- cgit 1.5.1