Browse Source

Added RestDMChannel documentation

pull/1161/head
Casino Boyale 7 years ago
parent
commit
17847e95e2
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs

+ 14
- 0
src/Discord.Net.Rest/Entities/Channels/RestDMChannel.cs View File

@@ -15,9 +15,19 @@ namespace Discord.Rest
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class RestDMChannel : RestChannel, IDMChannel, IRestPrivateChannel, IRestMessageChannel
{
/// <summary>
/// Gets the current logged-in user.
/// </summary>
public RestUser CurrentUser { get; }

/// <summary>
/// Gets the recipient of the channel.
/// </summary>
public RestUser Recipient { get; }

/// <summary>
/// Gets a collection that is the current logged-in user and the recipient.
/// </summary>
public IReadOnlyCollection<RestUser> Users => ImmutableArray.Create(CurrentUser, Recipient);

internal RestDMChannel(BaseDiscordClient discord, ulong id, ulong recipientId)
@@ -132,6 +142,10 @@ namespace Discord.Rest
public IDisposable EnterTypingState(RequestOptions options = null)
=> ChannelHelper.EnterTypingState(this, Discord, options);

/// <summary>
/// Gets a string that represents the Username#Discriminator of the recipient.
/// </summary>
/// <returns></returns>
public override string ToString() => $"@{Recipient}";
private string DebuggerDisplay => $"@{Recipient} ({Id}, DM)";



Loading…
Cancel
Save