diff --git a/src/Discord.Net.WebSocket/DiscordShardedClient.cs b/src/Discord.Net.WebSocket/DiscordShardedClient.cs index 4b67322a3..48c595166 100644 --- a/src/Discord.Net.WebSocket/DiscordShardedClient.cs +++ b/src/Discord.Net.WebSocket/DiscordShardedClient.cs @@ -83,7 +83,7 @@ namespace Discord.WebSocket _shardIdsToIndex = new Dictionary(); config.DisplayInitialLog = false; _baseConfig = config; - _defaultStickers = new ImmutableArray>(); + _defaultStickers = ImmutableArray.Create>(); if (config.TotalShards == null) _automaticShards = true; diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index ced0f80e7..9c5766ba7 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -149,7 +149,7 @@ namespace Discord.WebSocket Rest = new DiscordSocketRestClient(config, ApiClient); _heartbeatTimes = new ConcurrentQueue(); _gatewayIntents = config.GatewayIntents; - _defaultStickers = new ImmutableArray>(); + _defaultStickers = ImmutableArray.Create>(); _stateLock = new SemaphoreSlim(1, 1); _gatewayLogger = LogManager.CreateLogger(ShardId == 0 && TotalShards == 1 ? "Gateway" : $"Shard #{ShardId}"); @@ -210,7 +210,7 @@ namespace Discord.WebSocket internal override async Task OnLoginAsync(TokenType tokenType, string token) { - if(this._shardedClient != null && this._defaultStickers.Length == 0) + if(this._shardedClient == null && this._defaultStickers.Length == 0) { var models = await ApiClient.ListNitroStickerPacksAsync().ConfigureAwait(false);