Adds builders for Thumbnail and Image embeds, and adds json model for Video and Image embeds.
This commit is contained in:
@@ -14,6 +14,8 @@ namespace Discord
|
||||
public string Title { get; }
|
||||
public string Type { get; }
|
||||
public Color? Color { get; }
|
||||
public EmbedImage? Image { get; }
|
||||
public EmbedVideo? Video { get; }
|
||||
public EmbedAuthor? Author { get; }
|
||||
public EmbedFooter? Footer { get; }
|
||||
public EmbedProvider? Provider { get; }
|
||||
@@ -25,6 +27,8 @@ namespace Discord
|
||||
string description,
|
||||
string url,
|
||||
Color? color,
|
||||
EmbedImage? image,
|
||||
EmbedVideo? video,
|
||||
EmbedAuthor? author,
|
||||
EmbedFooter? footer,
|
||||
EmbedProvider? provider,
|
||||
@@ -36,6 +40,8 @@ namespace Discord
|
||||
Description = description;
|
||||
Url = url;
|
||||
Color = color;
|
||||
Image = image;
|
||||
Video = video;
|
||||
Author = author;
|
||||
Footer = footer;
|
||||
Provider = provider;
|
||||
@@ -46,6 +52,8 @@ namespace Discord
|
||||
{
|
||||
return new Embed(model.Type, model.Title, model.Description, model.Url,
|
||||
model.Color.HasValue ? new Color(model.Color.Value) : (Color?)null,
|
||||
model.Image.IsSpecified ? EmbedImage.Create(model.Image.Value) : (EmbedImage?)null,
|
||||
model.Video.IsSpecified ? EmbedVideo.Create(model.Video.Value) : (EmbedVideo?)null,
|
||||
model.Author.IsSpecified ? EmbedAuthor.Create(model.Author.Value) : (EmbedAuthor?)null,
|
||||
model.Footer.IsSpecified ? EmbedFooter.Create(model.Footer.Value) : (EmbedFooter?)null,
|
||||
model.Provider.IsSpecified ? EmbedProvider.Create(model.Provider.Value) : (EmbedProvider?)null,
|
||||
|
||||
Reference in New Issue
Block a user