Condense redundant AddField overloads in EmbedBuilder (#790)
* Remove extra AddField overload in EmbedBuilder * Remove AddInlineField()
This commit is contained in:
committed by
Christopher F
parent
4846264074
commit
479361bbea
@@ -171,24 +171,16 @@ namespace Discord
|
||||
return this;
|
||||
}
|
||||
|
||||
public EmbedBuilder AddField(string name, object value)
|
||||
public EmbedBuilder AddField(string name, object value, bool inline = false)
|
||||
{
|
||||
var field = new EmbedFieldBuilder()
|
||||
.WithIsInline(false)
|
||||
.WithName(name)
|
||||
.WithValue(value);
|
||||
AddField(field);
|
||||
return this;
|
||||
}
|
||||
public EmbedBuilder AddInlineField(string name, object value)
|
||||
{
|
||||
var field = new EmbedFieldBuilder()
|
||||
.WithIsInline(true)
|
||||
.WithIsInline(inline)
|
||||
.WithName(name)
|
||||
.WithValue(value);
|
||||
AddField(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EmbedBuilder AddField(EmbedFieldBuilder field)
|
||||
{
|
||||
if (Fields.Count >= MaxFieldCount)
|
||||
@@ -206,17 +198,6 @@ namespace Discord
|
||||
this.AddField(field);
|
||||
return this;
|
||||
}
|
||||
public EmbedBuilder AddField(string title, string text, bool inline = false)
|
||||
{
|
||||
var field = new EmbedFieldBuilder
|
||||
{
|
||||
Name = title,
|
||||
Value = text,
|
||||
IsInline = inline
|
||||
};
|
||||
_fields.Add(field);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Embed Build()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user