Browse Source

Added Topic support

tags/docs-0.9
RogueException 9 years ago
parent
commit
f4fa3bb8d4
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net/API/Common.cs
  2. +2
    -0
      src/Discord.Net/Models/Channel.cs

+ 2
- 0
src/Discord.Net/API/Common.cs View File

@@ -110,6 +110,8 @@ namespace Discord.API
public bool IsPrivate; public bool IsPrivate;
[JsonProperty("position")] [JsonProperty("position")]
public int Position; public int Position;
[JsonProperty(PropertyName = "topic")]
public string Topic;
[JsonProperty("permission_overwrites")] [JsonProperty("permission_overwrites")]
public PermissionOverwrite[] PermissionOverwrites; public PermissionOverwrite[] PermissionOverwrites;
[JsonProperty("recipient")] [JsonProperty("recipient")]


+ 2
- 0
src/Discord.Net/Models/Channel.cs View File

@@ -25,6 +25,8 @@ namespace Discord
/// <summary> Returns the name of this channel. </summary> /// <summary> Returns the name of this channel. </summary>
public string Name { get { return !IsPrivate ? $"{_name}" : $"@{Recipient.Name}"; } internal set { _name = value; } } public string Name { get { return !IsPrivate ? $"{_name}" : $"@{Recipient.Name}"; } internal set { _name = value; } }


/// <summary> Returns the topic associated with this channel. </summary>
public string Topic { get; internal set; }
/// <summary> Returns the position of this channel in the channel list for this server. </summary> /// <summary> Returns the position of this channel in the channel list for this server. </summary>
public int Position { get; internal set; } public int Position { get; internal set; }
/// <summary> Returns false is this is a public chat and true if this is a private chat with another user (see Recipient). </summary> /// <summary> Returns false is this is a public chat and true if this is a private chat with another user (see Recipient). </summary>


Loading…
Cancel
Save