From a4bfe6e41183759184ba708d89ca2e95da34162b Mon Sep 17 00:00:00 2001 From: quin lynch Date: Thu, 7 Oct 2021 00:29:27 -0300 Subject: [PATCH] Renamed Joined, Archived, and Locked to HasJoined, IsArchived, and IsLocked --- .../Entities/Channels/IThreadChannel.cs | 6 +++--- .../Entities/Channels/RestThreadChannel.cs | 12 ++++++------ .../Entities/Channels/SocketThreadChannel.cs | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs b/src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs index b5d6eea20..72d65a2e8 100644 --- a/src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs +++ b/src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs @@ -19,12 +19,12 @@ namespace Discord /// /// if the current user has joined this thread, otherwise . /// - bool Joined { get; } + bool HasJoined { get; } /// /// if the current thread is archived, otherwise . /// - bool Archived { get; } + bool IsArchived { get; } /// /// Duration to automatically archive the thread after recent activity. @@ -39,7 +39,7 @@ namespace Discord /// /// if the current thread is locked, otherwise /// - bool Locked { get; } + bool IsLocked { get; } /// /// An approximate count of users in a thread, stops counting at 50. diff --git a/src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs b/src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs index d9b223f18..0fb55e797 100644 --- a/src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs +++ b/src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs @@ -16,10 +16,10 @@ namespace Discord.Rest { public ThreadType Type { get; private set; } /// - public bool Joined { get; private set; } + public bool HasJoined { get; private set; } /// - public bool Archived { get; private set; } + public bool IsArchived { get; private set; } /// public ThreadArchiveDuration AutoArchiveDuration { get; private set; } @@ -28,7 +28,7 @@ namespace Discord.Rest public DateTimeOffset ArchiveTimestamp { get; private set; } /// - public bool Locked { get; private set; } + public bool IsLocked { get; private set; } /// public int MemberCount { get; private set; } @@ -58,14 +58,14 @@ namespace Discord.Rest { base.Update(model); - Joined = model.ThreadMember.IsSpecified; + HasJoined = model.ThreadMember.IsSpecified; if (model.ThreadMetadata.IsSpecified) { - Archived = model.ThreadMetadata.Value.Archived; + IsArchived = model.ThreadMetadata.Value.Archived; AutoArchiveDuration = model.ThreadMetadata.Value.AutoArchiveDuration; ArchiveTimestamp = model.ThreadMetadata.Value.ArchiveTimestamp; - Locked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false); + IsLocked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false); } diff --git a/src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs b/src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs index 9a8f4b139..3fd47ec87 100644 --- a/src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs +++ b/src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs @@ -35,7 +35,7 @@ namespace Discord.WebSocket => Users.FirstOrDefault(x => x.Id == Discord.CurrentUser.Id); /// - public bool Joined { get; private set; } + public bool HasJoined { get; private set; } /// /// if this thread is private, otherwise @@ -55,7 +55,7 @@ namespace Discord.WebSocket public int MemberCount { get; private set; } /// - public bool Archived { get; private set; } + public bool IsArchived { get; private set; } /// public DateTimeOffset ArchiveTimestamp { get; private set; } @@ -64,7 +64,7 @@ namespace Discord.WebSocket public ThreadArchiveDuration AutoArchiveDuration { get; private set; } /// - public bool Locked { get; private set; } + public bool IsLocked { get; private set; } /// /// Gets a collection of cached users within this thread. @@ -106,10 +106,10 @@ namespace Discord.WebSocket if (model.ThreadMetadata.IsSpecified) { - Archived = model.ThreadMetadata.Value.Archived; + IsArchived = model.ThreadMetadata.Value.Archived; ArchiveTimestamp = model.ThreadMetadata.Value.ArchiveTimestamp; AutoArchiveDuration = (ThreadArchiveDuration)model.ThreadMetadata.Value.AutoArchiveDuration; - Locked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false); + IsLocked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false); } if (model.OwnerId.IsSpecified) @@ -117,7 +117,7 @@ namespace Discord.WebSocket Owner = GetUser(model.OwnerId.Value); } - Joined = model.ThreadMember.IsSpecified; + HasJoined = model.ThreadMember.IsSpecified; } internal IReadOnlyCollection RemoveUsers(ulong[] users)