Fixed channel topics
This commit is contained in:
@@ -109,7 +109,7 @@ namespace Discord.API
|
|||||||
[JsonProperty("is_private")]
|
[JsonProperty("is_private")]
|
||||||
public bool IsPrivate;
|
public bool IsPrivate;
|
||||||
[JsonProperty("position")]
|
[JsonProperty("position")]
|
||||||
public int Position;
|
public int? Position;
|
||||||
[JsonProperty(PropertyName = "topic")]
|
[JsonProperty(PropertyName = "topic")]
|
||||||
public string Topic;
|
public string Topic;
|
||||||
[JsonProperty("permission_overwrites")]
|
[JsonProperty("permission_overwrites")]
|
||||||
|
|||||||
@@ -89,14 +89,19 @@ namespace Discord
|
|||||||
|
|
||||||
internal void Update(API.ChannelReference model)
|
internal void Update(API.ChannelReference model)
|
||||||
{
|
{
|
||||||
Name = model.Name;
|
if (model.Name != null)
|
||||||
Type = model.Type;
|
Name = model.Name;
|
||||||
|
if (model.Type != null)
|
||||||
|
Type = model.Type;
|
||||||
}
|
}
|
||||||
internal void Update(API.ChannelInfo model)
|
internal void Update(API.ChannelInfo model)
|
||||||
{
|
{
|
||||||
Update(model as API.ChannelReference);
|
Update(model as API.ChannelReference);
|
||||||
|
|
||||||
Position = model.Position;
|
if (model.Position != null)
|
||||||
|
Position = model.Position.Value;
|
||||||
|
if (model.Topic != null)
|
||||||
|
Topic = model.Topic;
|
||||||
|
|
||||||
if (model.PermissionOverwrites != null)
|
if (model.PermissionOverwrites != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user