コード例 #1
0
ファイル: DiscordEmbed.cs プロジェクト: xuan2261/Anarchy
 public DiscordEmbed()
 {
     Fields    = new List <EmbedField>();
     Thumbnail = new EmbedImage();
     Image     = new EmbedImage();
     Footer    = new EmbedFooter();
     Author    = new EmbedAuthor();
 }
コード例 #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>()));
 }
コード例 #3
0
ファイル: EmbedBuilder.cs プロジェクト: vijaykakani/AimiBot
 public EmbedFooterBuilder()
 {
     _footer = new EmbedFooter();
 }