You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

PrivateUser.cs 1.3 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.Threading.Tasks;
  2. namespace Discord
  3. {
  4. //TODO: Should this be linked directly to the Profile when it represents us, instead of maintaining a cache of values?
  5. public class PrivateUser : IUser
  6. {
  7. /// <inheritdoc />
  8. public EntityState State { get; internal set; }
  9. /// <inheritdoc />
  10. public ulong Id { get; }
  11. /// <summary> Returns the private channel for this user. </summary>
  12. public PrivateChannel Channel { get; }
  13. /// <inheritdoc />
  14. bool IUser.IsPrivate => true;
  15. /// <inheritdoc />
  16. public string Name { get; }
  17. /// <inheritdoc />
  18. public ushort Discriminator { get; }
  19. /// <inheritdoc />
  20. public bool IsBot { get; }
  21. /// <inheritdoc />
  22. public string AvatarId { get; }
  23. /// <inheritdoc />
  24. public string CurrentGame { get; }
  25. /// <inheritdoc />
  26. public UserStatus Status { get; }
  27. /// <inheritdoc />
  28. public DiscordClient Discord => Channel.Discord;
  29. /// <inheritdoc />
  30. public string AvatarUrl { get; }
  31. /// <inheritdoc />
  32. public string Mention { get; }
  33. /// <inheritdoc />
  34. Task<PrivateChannel> IUser.GetPrivateChannel() => Task.FromResult(Channel);
  35. public Task Update() => null;
  36. }
  37. }