Use StringEnum converter in API model
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#pragma warning disable CS1591
|
#pragma warning disable CS1591
|
||||||
using System;
|
using System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
namespace Discord.API
|
namespace Discord.API
|
||||||
{
|
{
|
||||||
@@ -14,7 +15,7 @@ namespace Discord.API
|
|||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
[JsonProperty("color")]
|
[JsonProperty("color")]
|
||||||
public uint? Color { get; set; }
|
public uint? Color { get; set; }
|
||||||
[JsonProperty("type")]
|
[JsonProperty("type"), JsonConverter(typeof(StringEnumConverter))]
|
||||||
public EmbedType Type { get; set; }
|
public EmbedType Type { get; set; }
|
||||||
[JsonProperty("timestamp")]
|
[JsonProperty("timestamp")]
|
||||||
public DateTimeOffset? Timestamp { get; set; }
|
public DateTimeOffset? Timestamp { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user