2024-06-24 13:56:01 +01:00
|
|
|
package cc.fascinated.bat.common;
|
|
|
|
|
2024-06-25 11:14:12 +01:00
|
|
|
import lombok.experimental.UtilityClass;
|
2024-06-24 13:56:01 +01:00
|
|
|
import net.dv8tion.jda.api.EmbedBuilder;
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Fascinated (fascinated7)
|
|
|
|
*/
|
2024-06-25 11:14:12 +01:00
|
|
|
@UtilityClass
|
2024-06-24 13:56:01 +01:00
|
|
|
public class EmbedUtils {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Builds a generic embed
|
|
|
|
*
|
|
|
|
* @return the embed builder
|
|
|
|
*/
|
2024-06-25 13:55:54 +01:00
|
|
|
public static EmbedBuilder buildGenericEmbed() {
|
2024-06-24 13:56:01 +01:00
|
|
|
return new EmbedBuilder()
|
|
|
|
.setTimestamp(LocalDateTime.now())
|
2024-06-24 14:58:57 +01:00
|
|
|
.setColor(Colors.DEFAULT);
|
2024-06-24 13:56:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Builds an error embed
|
|
|
|
*
|
|
|
|
* @return the embed builder
|
|
|
|
*/
|
2024-06-25 13:55:54 +01:00
|
|
|
public static EmbedBuilder buildErrorEmbed() {
|
2024-06-24 13:56:01 +01:00
|
|
|
return new EmbedBuilder()
|
|
|
|
.setTimestamp(LocalDateTime.now())
|
2024-06-24 14:58:57 +01:00
|
|
|
.setColor(Colors.ERROR);
|
2024-06-24 13:56:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Builds a success embed
|
|
|
|
*
|
|
|
|
* @return the embed builder
|
|
|
|
*/
|
2024-06-25 13:55:54 +01:00
|
|
|
public static EmbedBuilder buildSuccessEmbed() {
|
2024-06-24 13:56:01 +01:00
|
|
|
return new EmbedBuilder()
|
|
|
|
.setTimestamp(LocalDateTime.now())
|
2024-06-24 14:58:57 +01:00
|
|
|
.setColor(Colors.SUCCESS);
|
2024-06-24 13:56:01 +01:00
|
|
|
}
|
|
|
|
}
|