forked from Minecraft/javacord
parent
d1ad28c5df
commit
21a139cd1e
2
pom.xml
2
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue