Browse Source

Added Overloads for the EmbedBuilder Ctor

Changes:
Made it so that EmbedFieldBuilders can be passed to an EmbedBuilder
Made is so that EmbedAuthorBuilder, EmbedFootBuilder and EmbedFieldBuilders can be passed to an EmbedBuilder

Should have no breaking changes
pull/1013/head
Casino Boyale 8 years ago
parent
commit
954b151c8e
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs

+ 20
- 0
src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs View File

@@ -24,6 +24,26 @@ namespace Discord
Fields = new List<EmbedFieldBuilder>();
}

public EmbedBuilder(params EmbedFieldBuilder[] EmbedFields)
{
Fields = new List<EmbedFieldBuilder>();
foreach (var Field in EmbedFields)
{
Fields.Add(Field);
}
}

public EmbedBuilder(EmbedAuthorBuilder Author, EmbedFooterBuilder Footer, params EmbedFieldBuilder[] EmbedFields)
{
this.Author = Author;
this.Footer = Footer;
Fields = new List<EmbedFieldBuilder>();
foreach (var Field in EmbedFields)
{
Fields.Add(Field);
}
}

public string Title
{
get => _title;


Loading…
Cancel
Save