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.

ServerUser.cs 2.7 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading.Tasks;
  4. namespace Discord
  5. {
  6. public class ServerUser : IUser
  7. {
  8. /// <inheritdoc />
  9. public EntityState State { get; }
  10. /// <inheritdoc />
  11. public ulong Id { get; }
  12. /// <summary> Returns the private channel for this user. </summary>
  13. public Server Server { get; }
  14. /// <inheritdoc />
  15. bool IUser.IsPrivate => false;
  16. /// <inheritdoc />
  17. public string Name { get; }
  18. /// <inheritdoc />
  19. public ushort Discriminator { get; }
  20. /// <inheritdoc />
  21. public bool IsBot { get; }
  22. /// <inheritdoc />
  23. public string AvatarId { get; }
  24. /// <inheritdoc />
  25. public string CurrentGame { get; }
  26. /// <inheritdoc />
  27. public UserStatus Status { get; }
  28. /// <inheritdoc />
  29. public DateTime JoinedAt { get; }
  30. /// <inheritdoc />
  31. public IReadOnlyList<Role> Roles { get; }
  32. /// <summary> Returns true if this user has marked themselves as muted. </summary>
  33. public bool IsSelfMuted { get; }
  34. /// <summary> Returns true if this user has marked themselves as deafened. </summary>
  35. public bool IsSelfDeafened { get; }
  36. /// <summary> Returns true if the server is blocking audio from this user. </summary>
  37. public bool IsServerMuted { get; }
  38. /// <summary> Returns true if the server is blocking audio to this user. </summary>
  39. public bool IsServerDeafened { get; }
  40. /// <summary> Returns true if the server is temporarily blocking audio to/from this user. </summary>
  41. public bool IsServerSuppressed { get; }
  42. /// <summary> Gets this user's current voice channel. </summary>
  43. public VoiceChannel VoiceChannel { get; }
  44. /// <inheritdoc />
  45. public DiscordClient Discord { get; }
  46. /// <inheritdoc />
  47. public string AvatarUrl { get; }
  48. /// <inheritdoc />
  49. public string Mention { get; }
  50. public ServerPermissions ServerPermissions { get; }
  51. public ChannelPermissions GetPermissions(IPublicChannel channel) => default(ChannelPermissions);
  52. /// <inheritdoc />
  53. public Task<PrivateChannel> GetPrivateChannel() => null;
  54. public Task<IEnumerable<IPublicChannel>> GetChannels() => null;
  55. public bool HasRole(Role role) => false;
  56. public Task AddRoles(params Role[] roles) => null;
  57. public Task RemoveRoles(params Role[] roles) => null;
  58. public Task Update() => null;
  59. public Task Kick() => null;
  60. public Task Ban(int pruneDays = 0) => null;
  61. public Task Unban() => null;
  62. }
  63. }