Exemple #1
0
 public DiscordEmbed()
 {
     Fields    = new List <EmbedField>();
     Thumbnail = new EmbedImage();
     Image     = new EmbedImage();
     Footer    = new EmbedFooter();
     Author    = new EmbedAuthor();
 }
Exemple #2
0
 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.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,
                      model.Thumbnail.IsSpecified ? EmbedThumbnail.Create(model.Thumbnail.Value) : (EmbedThumbnail?)null,
                      model.Fields.IsSpecified ? model.Fields.Value.Select(x => EmbedField.Create(x)).ToImmutableArray() : ImmutableArray.Create <EmbedField>()));
 }
Exemple #3
0
 public EmbedFooterBuilder()
 {
     _footer = new EmbedFooter();
 }