From 4c572d25d8778ef56a1dd62a4f2989ec58de7e6a Mon Sep 17 00:00:00 2001
From: Toastie <toastie@toastiet0ast.com>
Date: Wed, 29 Jan 2025 23:38:57 +1300
Subject: [PATCH] Changes

---
 .../StreamNotification/StreamNotificationService.cs       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs
index f4a3c59..fa4e320 100644
--- a/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs
+++ b/src/EllieBot/Modules/Searches/StreamNotification/StreamNotificationService.cs
@@ -108,7 +108,8 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
                                            _shardData.ShardId))
                                        .Where(gc => gc.DeleteStreamOnlineMessage)
                                        .Select(x => x.GuildId)
-                                       .ToListAsyncLinqToDB();
+                                       .ToListAsyncLinqToDB()
+                                       .Fmap(x => x.ToConcurrentSet());
 
         foreach (var guildId in deleteOnOffline)
             _deleteOnOfflineServers.Add(guildId);
@@ -151,11 +152,11 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
 
     public async Task OnReadyAsync()
     {
+        await InitStateAsync();
+
         if (_client.ShardId != 0)
             return;
 
-        await InitStateAsync();
-
         using var timer = new PeriodicTimer(TimeSpan.FromMinutes(30));
         while (await timer.WaitForNextTickAsync())
         {
@@ -359,7 +360,6 @@ public sealed class StreamNotificationService : IEService, IReadyExecutor
                                      .Select(x => x.NotifyStreamOffline)
                                      .FirstOrDefaultAsyncLinqToDB();
 
-        // todo hashset
         if (notifyOffline)
             _offlineNotificationServers.Add(guild.Id);