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.

Channel.cs 1.6 kB

Add support for channel categories (#907) commit a85c5814a74e473e95fe172f0379cbc7f9f951d8 Author: Christopher F <computerizedtaco@gmail.com> Date: Sat Jan 6 22:25:48 2018 -0500 Code cleanup commit 4b243fd3dd99152b4ebc7ee01d704bd8e57eeee1 Author: Christopher F <computerizedtaco@gmail.com> Date: Sat Jan 6 22:08:28 2018 -0500 Add support for channel categories (#907) commit 41ed9106f2b05530acbf06b245c9aa618011d815 Author: mrspits4ever <spits.lucas@gmail.com> Date: Thu Dec 14 20:02:57 2017 +0100 removed mentioning support for RestCategoryChannel, added channels property to SocketCategoryChannel commit 71142c310847886dff80c49e9357dd0786d67a1b Merge: 4589d731 678a7238 Author: mrspits4ever <spits.lucas@gmail.com> Date: Wed Dec 13 21:17:53 2017 +0100 Merge branch 'dev' of https://github.com/RogueException/Discord.Net into feature/channel-categories commit 4589d73187871c98485ed25c6d223706927af7ec Author: mrspits4ever <spits.lucas@gmail.com> Date: Wed Dec 13 21:17:46 2017 +0100 adressed requested changes commit d59b038efa048b2279602e2015ddd2c185e58d63 Author: pegasy <pegasy@users.noreply.github.com> Date: Mon Sep 25 18:53:23 2017 +0200 Renamed classes / properties / methods to use CategoryChannel instead of ChannelCategory to be consistant with how text / voice channels are named. commit 5c4777dc8cc443108f2e7e4afae98824c9a32b1f Author: pegasy <pegasy@users.noreply.github.com> Date: Sun Sep 24 19:08:25 2017 +0200 removed Guild from class name for ChannelCategory Renamed all properties to use Category instead of Parent Throw exception on GetUsers / GetInvites etc for categories commit e18bd8c799d2327270021c05866cb2e97ad4671b Author: pegasy <pegasy@users.noreply.github.com> Date: Sun Sep 24 15:49:51 2017 +0200 Add support for channel categories (as its own channel type)
7 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma warning disable CS1591
  2. using Newtonsoft.Json;
  3. using System;
  4. namespace Discord.API
  5. {
  6. internal class Channel
  7. {
  8. //Shared
  9. [JsonProperty("id")]
  10. public ulong Id { get; set; }
  11. [JsonProperty("type")]
  12. public ChannelType Type { get; set; }
  13. [JsonProperty("last_message_id")]
  14. public ulong? LastMessageId { get; set; }
  15. //GuildChannel
  16. [JsonProperty("guild_id")]
  17. public Optional<ulong> GuildId { get; set; }
  18. [JsonProperty("name")]
  19. public Optional<string> Name { get; set; }
  20. [JsonProperty("position")]
  21. public Optional<int> Position { get; set; }
  22. [JsonProperty("permission_overwrites")]
  23. public Optional<Overwrite[]> PermissionOverwrites { get; set; }
  24. [JsonProperty("parent_id")]
  25. public ulong? CategoryId { get; set; }
  26. //TextChannel
  27. [JsonProperty("topic")]
  28. public Optional<string> Topic { get; set; }
  29. [JsonProperty("last_pin_timestamp")]
  30. public Optional<DateTimeOffset?> LastPinTimestamp { get; set; }
  31. [JsonProperty("nsfw")]
  32. public Optional<bool> Nsfw { get; set; }
  33. //VoiceChannel
  34. [JsonProperty("bitrate")]
  35. public Optional<int> Bitrate { get; set; }
  36. [JsonProperty("user_limit")]
  37. public Optional<int> UserLimit { get; set; }
  38. //PrivateChannel
  39. [JsonProperty("recipients")]
  40. public Optional<User[]> Recipients { get; set; }
  41. //GroupChannel
  42. [JsonProperty("icon")]
  43. public Optional<string> Icon { get; set; }
  44. }
  45. }