When sending a message with no content, do not send a null value.

Resolves an issue where the ratelimiter would panic.
This commit is contained in:
Christopher F
2016-11-13 13:54:46 -05:00
parent 8866a1499c
commit 754970bb56

View File

@@ -9,7 +9,6 @@ namespace Discord.API.Rest
{
[JsonProperty("content")]
public Optional<string> Content { get; }
[JsonProperty("nonce")]
public Optional<string> Nonce { get; set; }
[JsonProperty("tts")]
@@ -20,7 +19,7 @@ namespace Discord.API.Rest
public CreateMessageParams(string content)
{
if (string.IsNullOrEmpty(content))
Content = null;
Content = Optional.Create<string>();
else
Content = content;
}