Auto stash before merge of "develop" and "origin/develop"
This commit is contained in:
@@ -5,8 +5,6 @@ import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import core.Command;
|
||||
import core.LocStrings;
|
||||
import dataStructures.KittyChannel;
|
||||
@@ -17,7 +15,6 @@ import dataStructures.KittyRole;
|
||||
import dataStructures.KittyUser;
|
||||
import dataStructures.Response;
|
||||
import dataStructures.UserInput;
|
||||
import utils.GlobalLog;
|
||||
import utils.ImageUtils;
|
||||
|
||||
public class CommandColor extends Command
|
||||
@@ -38,8 +35,6 @@ public class CommandColor extends Command
|
||||
float a = 1;
|
||||
Color parsed = new Color(r, g, b, a);
|
||||
|
||||
GlobalLog.Log("1");
|
||||
|
||||
// Construct the image example file that we intend to display locally
|
||||
BufferedImage img = new BufferedImage(sideLength, sideLength, BufferedImage.TYPE_4BYTE_ABGR);
|
||||
Graphics2D graphics = img.createGraphics();
|
||||
@@ -47,25 +42,20 @@ public class CommandColor extends Command
|
||||
graphics.fillRect(0, 0, sideLength, sideLength);
|
||||
graphics.dispose();
|
||||
|
||||
GlobalLog.Log("2");
|
||||
|
||||
String tempFileName = ImageUtils.writeTempImageData(img, ".png");
|
||||
File file = new File(tempFileName);
|
||||
|
||||
GlobalLog.Log("3");
|
||||
|
||||
|
||||
// Build the response
|
||||
KittyEmbed response = new KittyEmbed();
|
||||
response.title = "Color Name";
|
||||
response.color = parsed;
|
||||
response.descriptionText = "`rgba` test\n`hex` test\n`hsv` test";
|
||||
response.thumbnailURL = "attachment://" + tempFileName;
|
||||
response.footerText = "All percentages and values are rounded to the nearest whole number";
|
||||
|
||||
GlobalLog.Log("4");
|
||||
|
||||
// Send then delete the temp local files
|
||||
res.CallEmbed(response);
|
||||
ImageUtils.BlockingFileDelete(file);
|
||||
|
||||
GlobalLog.Log("5");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user