Browse Source

Cleaned up & fixed code style.

pull/978/head
WamWooWam 7 years ago
parent
commit
f38dd4c421
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/Discord.Net.Rest/API/Rest/UploadFileParams.cs

+ 4
- 3
src/Discord.Net.Rest/API/Rest/UploadFileParams.cs View File

@@ -11,7 +11,6 @@ namespace Discord.API.Rest
{
internal class UploadFileParams
{
// Fuckin Discord man.
private static JsonSerializer _serializer = new JsonSerializer { ContractResolver = new DiscordContractResolver() };

public Stream File { get; }
@@ -43,8 +42,10 @@ namespace Discord.API.Rest
using (TextWriter text = new StringWriter(sb, CultureInfo.InvariantCulture))
using (JsonWriter writer = new JsonTextWriter(text))
{
// I apologise for the mess I've created here, god damn is this annoying.
_serializer.Serialize(writer, new Dictionary<string, object>() { { "embed", Embed.Value } });
Dictionary<string, object> dictionary = new Dictionary<string, object>();
dictionary["embed"] = Embed.Value;

_serializer.Serialize(writer, dictionary);
}
d["payload_json"] = sb.ToString();
}


Loading…
Cancel
Save