@@ -13,8 +13,8 @@ namespace Discord
public string Url { get; }
public string Url { get; }
public string Title { get; }
public string Title { get; }
public string Type { get; }
public string Type { get; }
public Color? Color { get; }
public DateTimeOffset? Timestamp { get; }
public DateTimeOffset? Timestamp { get; }
public Color? Color { get; }
public EmbedImage? Image { get; }
public EmbedImage? Image { get; }
public EmbedVideo? Video { get; }
public EmbedVideo? Video { get; }
public EmbedAuthor? Author { get; }
public EmbedAuthor? Author { get; }
@@ -24,11 +24,11 @@ namespace Discord
public ImmutableArray<EmbedField> Fields { get; }
public ImmutableArray<EmbedField> Fields { get; }
internal Embed(string type,
internal Embed(string type,
string title,
string description,
string url,
Color? color,
string title,
string description,
string url,
DateTimeOffset? timestamp,
DateTimeOffset? timestamp,
Color? color,
EmbedImage? image,
EmbedImage? image,
EmbedVideo? video,
EmbedVideo? video,
EmbedAuthor? author,
EmbedAuthor? author,
@@ -53,9 +53,8 @@ namespace Discord
}
}
internal static Embed Create(Model model)
internal static Embed Create(Model model)
{
{
return new Embed(model.Type, model.Title, model.Description, model.Url,
model.Color.HasValue ? new Color(model.Color.Value) : (Color?)null,
model.Timestamp.IsSpecified ? model.Timestamp.Value : (DateTimeOffset?)null,
return new Embed(model.Type, model.Title, model.Description, model.Url,model.Timestamp,
model.Color.HasValue ? new Color(model.Color.Value) : (Color?)null,
model.Image.IsSpecified ? EmbedImage.Create(model.Image.Value) : (EmbedImage?)null,
model.Image.IsSpecified ? EmbedImage.Create(model.Image.Value) : (EmbedImage?)null,
model.Video.IsSpecified ? EmbedVideo.Create(model.Video.Value) : (EmbedVideo?)null,
model.Video.IsSpecified ? EmbedVideo.Create(model.Video.Value) : (EmbedVideo?)null,
model.Author.IsSpecified ? EmbedAuthor.Create(model.Author.Value) : (EmbedAuthor?)null,
model.Author.IsSpecified ? EmbedAuthor.Create(model.Author.Value) : (EmbedAuthor?)null,