forked from Minecraft/javacord
Fix format escape and update test.
Ready for first release. Signed-off-by: Etzelia <etzelia@hotmail.com>main
parent
21a139cd1e
commit
6e20ef32b7
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
<groupId>xyz.etztech</groupId>
|
||||
<artifactId>javacord</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.0.2</version>
|
||||
<version>0.1.0</version>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
|
|
|
@ -6,7 +6,8 @@ public class Javacord {
|
|||
return input
|
||||
.replaceAll("_", "\\\\\\\\_")
|
||||
.replaceAll("\\*", "\\\\\\\\*")
|
||||
.replaceAll("~", "\\\\\\\\~");
|
||||
.replaceAll("~", "\\\\\\\\~")
|
||||
.replaceAll("\\|", "\\\\\\\\|");
|
||||
}
|
||||
|
||||
public static String escapeQuote(String input) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import xyz.etztech.Javacord;
|
||||
import xyz.etztech.embed.Author;
|
||||
import xyz.etztech.embed.Embed;
|
||||
import xyz.etztech.embed.Webhook;
|
||||
|
@ -10,8 +11,9 @@ public class Test {
|
|||
Embed embed = new Embed()
|
||||
.color(3306460)
|
||||
.timestamp(OffsetDateTime.now())
|
||||
.description("Etzelia found some \"diamond\" ore")
|
||||
.title("Etzelia found some \"diamond\" ore")
|
||||
.author(new Author("Etzelia", "", "https://minotar.net/helm/Etzelia/100.png", ""));
|
||||
embed.description(Javacord.escapeFormat("*Test* **Test** _Test_ __Test__ ~Test~ ~~Test~~ |Test| ||Test||"));
|
||||
Webhook webhook = new Webhook("@here", embed);
|
||||
System.out.println(webhook);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue