From c01da2596d5cdfe3590c8a07d589b937439fc91e Mon Sep 17 00:00:00 2001 From: Mark Gross Date: Fri, 11 Aug 2017 17:45:31 -0700 Subject: [PATCH 1/2] Remove extra AddField overload in EmbedBuilder --- .../Entities/Messages/EmbedBuilder.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs b/src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs index 7b02858910..acea1e23c2 100644 --- a/src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs +++ b/src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs @@ -171,10 +171,10 @@ public EmbedBuilder WithFooter(string text, string iconUrl = null) 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) + .WithIsInline(inline) .WithName(name) .WithValue(value); AddField(field); @@ -206,17 +206,6 @@ public EmbedBuilder AddField(Action action) 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() { From 13b8cbcb8f7e81e4ed3a3b32a8e3cc6e663553e1 Mon Sep 17 00:00:00 2001 From: Mark Gross Date: Sat, 12 Aug 2017 11:41:20 -0700 Subject: [PATCH 2/2] Remove AddInlineField() --- src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs b/src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs index acea1e23c2..c9e8d4017e 100644 --- a/src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs +++ b/src/Discord.Net.Rest/Entities/Messages/EmbedBuilder.cs @@ -180,15 +180,7 @@ public EmbedBuilder AddField(string name, object value, bool inline = false) AddField(field); return this; } - public EmbedBuilder AddInlineField(string name, object value) - { - var field = new EmbedFieldBuilder() - .WithIsInline(true) - .WithName(name) - .WithValue(value); - AddField(field); - return this; - } + public EmbedBuilder AddField(EmbedFieldBuilder field) { if (Fields.Count >= MaxFieldCount)