Browse Source

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

Resolves an issue where the ratelimiter would panic.
tags/1.0-rc
Christopher F 8 years ago
parent
commit
754970bb56
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/Discord.Net.Core/API/Rest/CreateMessageParams.cs

+ 1
- 2
src/Discord.Net.Core/API/Rest/CreateMessageParams.cs 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;
}


Loading…
Cancel
Save