Browse Source

Renamed Joined, Archived, and Locked to HasJoined, IsArchived, and IsLocked

pull/1923/head
quin lynch 3 years ago
parent
commit
a4bfe6e411
3 changed files with 15 additions and 15 deletions
  1. +3
    -3
      src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs
  2. +6
    -6
      src/Discord.Net.Rest/Entities/Channels/RestThreadChannel.cs
  3. +6
    -6
      src/Discord.Net.WebSocket/Entities/Channels/SocketThreadChannel.cs

+ 3
- 3
src/Discord.Net.Core/Entities/Channels/IThreadChannel.cs View File

@@ -19,12 +19,12 @@ namespace Discord
/// <summary> /// <summary>
/// <see langword="true"/> if the current user has joined this thread, otherwise <see langword="false"/>. /// <see langword="true"/> if the current user has joined this thread, otherwise <see langword="false"/>.
/// </summary> /// </summary>
bool Joined { get; }
bool HasJoined { get; }


/// <summary> /// <summary>
/// <see langword="true"/> if the current thread is archived, otherwise <see langword="false"/>. /// <see langword="true"/> if the current thread is archived, otherwise <see langword="false"/>.
/// </summary> /// </summary>
bool Archived { get; }
bool IsArchived { get; }


/// <summary> /// <summary>
/// Duration to automatically archive the thread after recent activity. /// Duration to automatically archive the thread after recent activity.
@@ -39,7 +39,7 @@ namespace Discord
/// <summary> /// <summary>
/// <see langword="true"/> if the current thread is locked, otherwise <see langword="false"/> /// <see langword="true"/> if the current thread is locked, otherwise <see langword="false"/>
/// </summary> /// </summary>
bool Locked { get; }
bool IsLocked { get; }


/// <summary> /// <summary>
/// An approximate count of users in a thread, stops counting at 50. /// An approximate count of users in a thread, stops counting at 50.


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

@@ -16,10 +16,10 @@ namespace Discord.Rest
{ {
public ThreadType Type { get; private set; } public ThreadType Type { get; private set; }
/// <inheritdoc/> /// <inheritdoc/>
public bool Joined { get; private set; }
public bool HasJoined { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public bool Archived { get; private set; }
public bool IsArchived { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public ThreadArchiveDuration AutoArchiveDuration { get; private set; } public ThreadArchiveDuration AutoArchiveDuration { get; private set; }
@@ -28,7 +28,7 @@ namespace Discord.Rest
public DateTimeOffset ArchiveTimestamp { get; private set; } public DateTimeOffset ArchiveTimestamp { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public bool Locked { get; private set; }
public bool IsLocked { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public int MemberCount { get; private set; } public int MemberCount { get; private set; }
@@ -58,14 +58,14 @@ namespace Discord.Rest
{ {
base.Update(model); base.Update(model);


Joined = model.ThreadMember.IsSpecified;
HasJoined = model.ThreadMember.IsSpecified;


if (model.ThreadMetadata.IsSpecified) if (model.ThreadMetadata.IsSpecified)
{ {
Archived = model.ThreadMetadata.Value.Archived;
IsArchived = model.ThreadMetadata.Value.Archived;
AutoArchiveDuration = model.ThreadMetadata.Value.AutoArchiveDuration; AutoArchiveDuration = model.ThreadMetadata.Value.AutoArchiveDuration;
ArchiveTimestamp = model.ThreadMetadata.Value.ArchiveTimestamp; ArchiveTimestamp = model.ThreadMetadata.Value.ArchiveTimestamp;
Locked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false);
IsLocked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false);
} }




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

@@ -35,7 +35,7 @@ namespace Discord.WebSocket
=> Users.FirstOrDefault(x => x.Id == Discord.CurrentUser.Id); => Users.FirstOrDefault(x => x.Id == Discord.CurrentUser.Id);


/// <inheritdoc/> /// <inheritdoc/>
public bool Joined { get; private set; }
public bool HasJoined { get; private set; }


/// <summary> /// <summary>
/// <see langword="true"/> if this thread is private, otherwise <see langword="false"/> /// <see langword="true"/> if this thread is private, otherwise <see langword="false"/>
@@ -55,7 +55,7 @@ namespace Discord.WebSocket
public int MemberCount { get; private set; } public int MemberCount { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public bool Archived { get; private set; }
public bool IsArchived { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public DateTimeOffset ArchiveTimestamp { get; private set; } public DateTimeOffset ArchiveTimestamp { get; private set; }
@@ -64,7 +64,7 @@ namespace Discord.WebSocket
public ThreadArchiveDuration AutoArchiveDuration { get; private set; } public ThreadArchiveDuration AutoArchiveDuration { get; private set; }


/// <inheritdoc/> /// <inheritdoc/>
public bool Locked { get; private set; }
public bool IsLocked { get; private set; }


/// <summary> /// <summary>
/// Gets a collection of cached users within this thread. /// Gets a collection of cached users within this thread.
@@ -106,10 +106,10 @@ namespace Discord.WebSocket
if (model.ThreadMetadata.IsSpecified) if (model.ThreadMetadata.IsSpecified)
{ {
Archived = model.ThreadMetadata.Value.Archived;
IsArchived = model.ThreadMetadata.Value.Archived;
ArchiveTimestamp = model.ThreadMetadata.Value.ArchiveTimestamp; ArchiveTimestamp = model.ThreadMetadata.Value.ArchiveTimestamp;
AutoArchiveDuration = (ThreadArchiveDuration)model.ThreadMetadata.Value.AutoArchiveDuration; AutoArchiveDuration = (ThreadArchiveDuration)model.ThreadMetadata.Value.AutoArchiveDuration;
Locked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false);
IsLocked = model.ThreadMetadata.Value.Locked.GetValueOrDefault(false);
} }


if (model.OwnerId.IsSpecified) if (model.OwnerId.IsSpecified)
@@ -117,7 +117,7 @@ namespace Discord.WebSocket
Owner = GetUser(model.OwnerId.Value); Owner = GetUser(model.OwnerId.Value);
} }


Joined = model.ThreadMember.IsSpecified;
HasJoined = model.ThreadMember.IsSpecified;
} }


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


Loading…
Cancel
Save