Fixed ordering.

This commit is contained in:
Sindre G. Langhus
2016-11-25 21:51:01 +01:00
parent d0158816d3
commit 54dd0a5cec
4 changed files with 15 additions and 16 deletions

View File

@@ -49,7 +49,7 @@ namespace Discord.API
{
_restClientProvider = restClientProvider;
_userAgent = userAgent;
_serializer = serializer ?? new JsonSerializer { DateFormatString = "yyyy-MM-ddTHH:mm:ssZ", DateTimeZoneHandling = DateTimeZoneHandling.Utc, ContractResolver = new DiscordContractResolver() };
_serializer = serializer ?? new JsonSerializer { DateFormatString = "yyyy-MM-ddTHH:mm:ssZ", ContractResolver = new DiscordContractResolver() };
RequestQueue = requestQueue;
FetchCurrentUser = true;

View File

@@ -25,8 +25,8 @@ namespace Discord
public string Url { get { return _model.Url; } set { _model.Url = value; } }
public string ThumbnailUrl { get; set; }
public string ImageUrl { get; set; }
public Color? Color { get { return _model.Color.HasValue ? new Color(_model.Color.Value) : (Color?)null; } set { _model.Color = value?.RawValue; } }
public DateTimeOffset? Timestamp { get; set; }
public Color? Color { get { return _model.Color.HasValue ? new Color(_model.Color.Value) : (Color?)null; } set { _model.Color = value?.RawValue; } }
public EmbedAuthorBuilder Author { get; set; }
public EmbedFooterBuilder Footer { get; set; }
@@ -55,11 +55,6 @@ namespace Discord
ImageUrl = ImageUrl;
return this;
}
public EmbedBuilder WithColor(Color color)
{
Color = color;
return this;
}
public EmbedBuilder WithTimestamp()
{
Timestamp = DateTimeOffset.UtcNow;
@@ -70,6 +65,11 @@ namespace Discord
Timestamp = dateTimeOffset;
return this;
}
public EmbedBuilder WithColor(Color color)
{
Color = color;
return this;
}
public EmbedBuilder WithAuthor(EmbedAuthorBuilder author)
{

View File

@@ -9,8 +9,8 @@ namespace Discord
string Type { get; }
string Title { get; }
string Description { get; }
Color? Color { get; }
DateTimeOffset? Timestamp { get; }
Color? Color { get; }
EmbedImage? Image { get; }
EmbedVideo? Video { get; }
EmbedAuthor? Author { get; }