Signed-off-by: Etzelia <etzelia@hotmail.com>
pull/1/head
Etzelia 2020-10-02 13:39:10 -05:00
parent 4e372f27f5
commit e766025589
No known key found for this signature in database
GPG Key ID: 708511AE7ABC5314
1 changed files with 1 additions and 2 deletions

View File

@ -109,8 +109,7 @@ public class Embed {
if (thumbnail != null) json.add(String.format("\"thumbnail\": %s", thumbnail.toJSON()));
if (image != null) json.add(String.format("\"image\": %s", image.toJSON()));
if (author != null) json.add(String.format("\"author\": %s", author.toJSON()));
if (fields.size() > 0)
json.add(String.format("\"fields\": [%s]", fields.stream().map(Field::toJSON).collect(Collectors.joining(","))));
if (fields.size() > 0) json.add(String.format("\"fields\": [%s]", fields.stream().map(Field::toJSON).collect(Collectors.joining(","))));
builder.append(String.join(",", json));
return builder.append("}").toString();
}