Liam
39c3d471c7
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 44s
53 lines
1.4 KiB
Java
53 lines
1.4 KiB
Java
package cc.fascinated.bat.common;
|
|
|
|
import lombok.experimental.UtilityClass;
|
|
import net.dv8tion.jda.api.EmbedBuilder;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
/**
|
|
* @author Fascinated (fascinated7)
|
|
*/
|
|
@UtilityClass
|
|
public class EmbedUtils {
|
|
|
|
/**
|
|
* Builds a generic embed
|
|
*
|
|
* @param description the description of the embed
|
|
* @return the embed builder
|
|
*/
|
|
public static EmbedBuilder buildGenericEmbed(String description) {
|
|
return new EmbedBuilder()
|
|
.setDescription(description)
|
|
.setTimestamp(LocalDateTime.now())
|
|
.setColor(Colors.DEFAULT);
|
|
}
|
|
|
|
/**
|
|
* Builds an error embed
|
|
*
|
|
* @param description the description of the embed
|
|
* @return the embed builder
|
|
*/
|
|
public static EmbedBuilder buildErrorEmbed(String description) {
|
|
return new EmbedBuilder()
|
|
.setDescription(description)
|
|
.setTimestamp(LocalDateTime.now())
|
|
.setColor(Colors.ERROR);
|
|
}
|
|
|
|
/**
|
|
* Builds a success embed
|
|
*
|
|
* @param description the description of the embed
|
|
* @return the embed builder
|
|
*/
|
|
public static EmbedBuilder buildSuccessEmbed(String description) {
|
|
return new EmbedBuilder()
|
|
.setDescription(description)
|
|
.setTimestamp(LocalDateTime.now())
|
|
.setColor(Colors.SUCCESS);
|
|
}
|
|
}
|