Browse Source

convert collections into immutable arrays

pull/2469/head
Misha133 2 years ago
parent
commit
028a70a8c6
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs
  2. +1
    -1
      src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs

+ 1
- 1
src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs View File

@@ -81,7 +81,7 @@ namespace Discord.Rest
Type = (ThreadType)model.Type;
ParentChannelId = model.CategoryId.Value;

AppliedTags = model.AppliedTags.GetValueOrDefault(Array.Empty<ulong>());
AppliedTags = model.AppliedTags.GetValueOrDefault(Array.Empty<ulong>()).ToImmutableArray();
}

/// <summary>


+ 1
- 1
src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs View File

@@ -153,7 +153,7 @@ namespace Discord.WebSocket

HasJoined = model.ThreadMember.IsSpecified;

AppliedTags = model.AppliedTags.GetValueOrDefault(Array.Empty<ulong>());
AppliedTags = model.AppliedTags.GetValueOrDefault(Array.Empty<ulong>()).ToImmutableArray();
}

internal IReadOnlyCollection<SocketThreadUser> RemoveUsers(ulong[] users)


Loading…
Cancel
Save