= color skeleton

This commit is contained in:
Matthew Cech
2019-06-17 22:02:04 -07:00
parent ede40ef9e3
commit 4eee13a359
9 changed files with 68 additions and 13 deletions
+2 -6
View File
@@ -4,7 +4,7 @@ import java.awt.Color;
public class KittyEmbed
{
public String title = null;
public String title = null; // Required, but if this remails null or is empty, it's made a blank space in Response.java.
public Color color = null;
public String footerText = null;
public String authorText = null;
@@ -13,9 +13,5 @@ public class KittyEmbed
public String descriptionText = null;
public String bodyImageURL = null;
public String imageURL = null;
public KittyEmbed()
{
}
public String thumbnailURL = null; // Did you know? This is the only field that can actually be a local image file. Use attachment://file.png as the string for it.
}
+7 -2
View File
@@ -33,8 +33,10 @@ public class Response
{
EmbedBuilder embed = new EmbedBuilder();
if(embedInfo.title != null)
if(embedInfo.title != null && !embedInfo.title.isEmpty())
embed.setTitle(embedInfo.title);
else
embed.setTitle(" ");
if(embedInfo.color != null)
embed.setColor(embedInfo.color);
@@ -49,7 +51,10 @@ public class Response
embed.setAuthor(embedInfo.authorText, embedInfo.authorLink, embedInfo.authorImage);
if(embedInfo.imageURL != null)
embed.setImage(embedInfo.imageURL);
embed.setImage(embedInfo.imageURL);
if(embedInfo.thumbnailURL != null)
embed.setThumbnail(embedInfo.thumbnailURL);
event.getChannel().sendMessage(embed.build()).queue();
}