Skip to content

Commit

Permalink
Cleaned up & fixed code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
WamWooWam committed Mar 12, 2018
1 parent 3f5b2c8 commit f38dd4c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Discord.Net.Rest/API/Rest/UploadFileParams.cs
Expand Up @@ -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; }
Expand Down Expand Up @@ -43,8 +42,10 @@ public UploadFileParams(Stream file)
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();
}
Expand Down

0 comments on commit f38dd4c

Please sign in to comment.