示例#1
0
 /// <summary>
 /// Adds field to this embed.
 /// </summary>
 /// <param name="field">Field to be added</param>
 /// <returns>This</returns>
 public Embed AddField(EmbedField field)
 {
     // If fields list is null
     if (Fields == null)
     {
         Fields = new List <EmbedField> {
             field
         }
     }
     ;
     else
     {
         Fields.Add(field);
     }
     // Returns this embed
     return(this);
 }
示例#2
0
 /// <summary>
 /// Adds field to this embed.
 /// </summary>
 /// <param name="title">Title of the field</param>
 /// <param name="description">Description of the field</param>
 /// <param name="inline">If this field should be inline</param>
 /// <returns>This</returns>
 public Embed AddField(string title, string description, bool inline = false) => AddField(EmbedField.Generate(title, description));