41 lines
976 B
Java
41 lines
976 B
Java
|
package cc.fascinated.bat.common;
|
||
|
|
||
|
import lombok.NonNull;
|
||
|
|
||
|
/**
|
||
|
* @author Fascinated (fascinated7)
|
||
|
*/
|
||
|
public class EmbedDescriptionBuilder {
|
||
|
/**
|
||
|
* Where the description is stored
|
||
|
*/
|
||
|
private final StringBuilder builder = new StringBuilder();
|
||
|
|
||
|
public EmbedDescriptionBuilder(String title) {
|
||
|
builder.append("**").append(title).append("**").append("\n");
|
||
|
}
|
||
|
|
||
|
@NonNull
|
||
|
public EmbedDescriptionBuilder appendLine(@NonNull String line, boolean arrow) {
|
||
|
builder.append(arrow ? "➜ " : "").append(line).append("\n");
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@NonNull
|
||
|
public EmbedDescriptionBuilder appendSubtitle(@NonNull String title) {
|
||
|
builder.append("**").append(title).append("**").append("\n");
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@NonNull
|
||
|
public EmbedDescriptionBuilder emptyLine() {
|
||
|
builder.append("\n");
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
@NonNull
|
||
|
public String build() {
|
||
|
return builder.toString();
|
||
|
}
|
||
|
}
|