Change builder and test time

Signed-off-by: Etzelia <etzelia@hotmail.com>
main
Etzelia 2020-07-30 16:40:45 -05:00
parent d1ad28c5df
commit 21a139cd1e
No known key found for this signature in database
GPG Key ID: 3CAEB74806C4ADE5
3 changed files with 17 additions and 16 deletions

View File

@ -6,7 +6,7 @@
<groupId>xyz.etztech</groupId>
<artifactId>javacord</artifactId>
<packaging>jar</packaging>
<version>0.0.1</version>
<version>0.0.2</version>
<developers>
<developer>

View File

@ -23,20 +23,18 @@ public class Embed {
private Author author;
private List<Field> fields;
public static Embed builder() {
Embed embed = new Embed();
embed.content = "";
embed.title = "";
embed.description = "";
embed.url = "";
embed.color = 0;
embed.timestamp = null;
embed.footer = null;
embed.thumbnail = null;
embed.image = null;
embed.author = null;
embed.fields = new ArrayList<>();
return embed;
public Embed() {
this.content = "";
this.title = "";
this.description = "";
this.url = "";
this.color = 0;
this.timestamp = null;
this.footer = null;
this.thumbnail = null;
this.image = null;
this.author = null;
this.fields = new ArrayList<>();
}
public Embed content(String content) {

View File

@ -2,11 +2,14 @@ import xyz.etztech.embed.Author;
import xyz.etztech.embed.Embed;
import xyz.etztech.embed.Webhook;
import java.time.OffsetDateTime;
public class Test {
public static void main(String[] args) {
Embed embed = Embed.builder()
Embed embed = new Embed()
.color(3306460)
.timestamp(OffsetDateTime.now())
.description("Etzelia found some \"diamond\" ore")
.author(new Author("Etzelia", "", "https://minotar.net/helm/Etzelia/100.png", ""));
Webhook webhook = new Webhook("@here", embed);