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.

TextChannel.cs 3.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Threading.Tasks;
  5. namespace Discord
  6. {
  7. public class TextChannel : ITextChannel, IPublicChannel, IMentionable, IModifiable<TextChannel.Properties>
  8. {
  9. public sealed class Properties
  10. {
  11. public string Name { get; }
  12. public string Topic { get; }
  13. public int Position { get; }
  14. }
  15. /// <inheritdoc />
  16. public ulong Id { get; }
  17. /// <inheritdoc />
  18. public DiscordClient Discord { get; }
  19. /// <inheritdoc />
  20. public EntityState State { get; }
  21. /// <inheritdoc />
  22. public ChannelType Type => ChannelType.Public | ChannelType.Text;
  23. /// <inheritdoc />
  24. public bool IsPrivate => false;
  25. /// <inheritdoc />
  26. public bool IsPublic => true;
  27. /// <inheritdoc />
  28. public bool IsText => true;
  29. /// <inheritdoc />
  30. public bool IsVoice => false;
  31. /// <inheritdoc />
  32. public string Name { get; }
  33. /// <inheritdoc />
  34. public string Topic { get; }
  35. /// <inheritdoc />
  36. public int Position { get; }
  37. /// <inheritdoc />
  38. public string Mention { get; }
  39. /// <inheritdoc />
  40. public Server Server { get; }
  41. /// <inheritdoc />
  42. public IEnumerable<PermissionOverwriteEntry> PermissionOverwrites { get; }
  43. /// <inheritdoc />
  44. public IEnumerable<User> Users { get; }
  45. /// <inheritdoc />
  46. public OverwritePermissions? GetPermissionOverwrite(User user) => null;
  47. /// <inheritdoc />
  48. public OverwritePermissions? GetPermissionOverwrite(Role role) => null;
  49. /// <inheritdoc />
  50. public Task<IEnumerable<User>> GetUsers() => null;
  51. /// <inheritdoc />
  52. public Task<Message> GetMessage(ulong id) => null;
  53. /// <inheritdoc />
  54. public Task<IEnumerable<Message>> GetMessages(int limit = 100) => null;
  55. /// <inheritdoc />
  56. public Task<IEnumerable<Message>> GetMessages(int limit = 100, ulong? relativeMessageId = null, Relative relativeDir = Relative.Before) => null;
  57. /// <inheritdoc />
  58. public Task<IEnumerable<Invite>> GetInvites() => null;
  59. /// <inheritdoc />
  60. public Task UpdatePermissionOverwrite(User user, OverwritePermissions permissions) => null;
  61. /// <inheritdoc />
  62. public Task UpdatePermissionOverwrite(Role role, OverwritePermissions permissions) => null;
  63. /// <inheritdoc />
  64. public Task RemovePermissionOverwrite(User user) => null;
  65. /// <inheritdoc />
  66. public Task RemovePermissionOverwrite(Role role) => null;
  67. /// <inheritdoc />
  68. public Task<Message> SendMessage(string text, bool isTTS = false) => null;
  69. /// <inheritdoc />
  70. public Task<Message> SendFile(string filePath, string text = null, bool isTTS = false) => null;
  71. /// <inheritdoc />
  72. public Task<Message> SendFile(Stream stream, string filename, string text = null, bool isTTS = false) => null;
  73. /// <inheritdoc />
  74. public Task SendIsTyping() => null;
  75. /// <inheritdoc />
  76. public Task<Invite> CreateInvite(int? maxAge = 1800, int? maxUses = null, bool tempMembership = false, bool withXkcd = false) => null;
  77. /// <inheritdoc />
  78. public Task Update() => null;
  79. /// <inheritdoc />
  80. public Task Modify(Action<Properties> func) => null;
  81. /// <inheritdoc />
  82. public Task Delete() => null;
  83. }
  84. }