forked from Fascinated/Bat
51 lines
1.3 KiB
Java
51 lines
1.3 KiB
Java
|
package cc.fascinated.bat.common;
|
||
|
|
||
|
import net.dv8tion.jda.api.EmbedBuilder;
|
||
|
|
||
|
import java.time.LocalDateTime;
|
||
|
|
||
|
/**
|
||
|
* @author Fascinated (fascinated7)
|
||
|
*/
|
||
|
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(0x2F3136);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 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(0xFF0000);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 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(0x00FF00);
|
||
|
}
|
||
|
}
|