diff --git a/src/nyc/c4q/ramonaharrison/Bot.java b/src/nyc/c4q/ramonaharrison/Bot.java index 6a52dd4..f90d429 100644 --- a/src/nyc/c4q/ramonaharrison/Bot.java +++ b/src/nyc/c4q/ramonaharrison/Bot.java @@ -4,8 +4,10 @@ import nyc.c4q.ramonaharrison.model.Message; import nyc.c4q.ramonaharrison.network.*; import nyc.c4q.ramonaharrison.network.response.*; +import nyc.c4q.ramonaharrison.util.Images; import java.util.List; +import java.util.Scanner; /** * Created by Ramona Harrison @@ -15,22 +17,6 @@ public class Bot { // TODO: implement your bot logic! - - public Bot() { - - } - - /** - * Sample method: tests the Slack API. Prints a message indicating success or failure. - */ - public void testApi() { - Response apiTest = Slack.testApi(); - System.out.println("API OK: " +apiTest.isOk() + "\n"); - } - - /** - * Sample method: prints all public AccessCode3-3 channel names and ids. Prints an error message on failure. - */ public void listChannels() { ListChannelsResponse listChannelsResponse = Slack.listChannels(); @@ -45,13 +31,6 @@ public void listChannels() { System.err.print("Error listing channels: " + listChannelsResponse.getError()); } } - - /** - * Sample method: prints up to the last 100 messages from a given channel. Prints an error message on failure. - * or failure. - * - * @param channelId id of the given channel. - */ public void listMessages(String channelId) { ListMessagesResponse listMessagesResponse = Slack.listMessages(channelId); @@ -69,11 +48,6 @@ public void listMessages(String channelId) { } } - /** - * Sample method: sends a plain text message to the #bots channel. Prints a message indicating success or failure. - * - * @param text message text. - */ public void sendMessageToBotsChannel(String text) { SendMessageResponse sendMessageResponse = Slack.sendMessage(text); @@ -83,6 +57,162 @@ public void sendMessageToBotsChannel(String text) { System.err.print("Error sending message: " + sendMessageResponse.getError()); } } +// public void quiz() { +// Slack.sendMessage("Yo bot channel 'bout to be lit g! You goody?"); +// +// while (true) { +// +// +// ListMessagesResponse listMessagesResponse = Slack.listMessages(Slack.BOTS_CHANNEL_ID); +// List messages = listMessagesResponse.getMessages(); +// String firstResponse = messages.get(0).getText(); +// String secondResponse = null; +// String thirdResponse = null; +// String fourthResponse = null; +// +// if (firstResponse.toLowerCase().contains("yes") || firstResponse.toLowerCase().contains("y")) { +// sendMessageToBotsChannel("Aight fam, it's gonna go like this- I give you a word, you tell me what it means. You feel me? " +// + "Pick a, b, or c, aight? " +// + "\n1st question: The word is Situationship. As in \"Sounds like you in a situationship\"." +// + "\na)A situation b)Playing at being in a relationship without actually being in one c)A committed relationship"); +// ListMessagesResponse listMessagesResponse1 = Slack.listMessages(Slack.BOTS_CHANNEL_ID); +// messages = listMessagesResponse.getMessages(); +// secondResponse = messages.get(0).getText(); +// } +// +// else { +// break; +// } +// +// if (secondResponse.equalsIgnoreCase("b")) { +// sendMessageToBotsChannel("You got it. Next word, gucci- as in \"What's gucci?\"" + +// "\na)Good b)Bad c)A designer"); +// ListMessagesResponse listMessagesResponse2 = Slack.listMessages(Slack.BOTS_CHANNEL_ID); +// messages = listMessagesResponse.getMessages(); +// thirdResponse = messages.get(0).getText(); +// } else { +// break; +// } +// if (thirdResponse.equalsIgnoreCase("a")) { +// sendMessageToBotsChannel("Another right answer, that's a good look. Aight how 'bout deuces?" +// + "\n a)A fancy way to say the number 2 b)Another way to say peace c)Another way to let someone know IDFWY"); +// //answer for deuces +// ListMessagesResponse listMessagesResponse3 = Slack.listMessages(Slack.BOTS_CHANNEL_ID); +// messages = listMessagesResponse.getMessages(); +// String fourthResponse = messages.get(0).getText(); +// if (fourthResponse.equalsIgnoreCase("b") || fourthResponse.equalsIgnoreCase("c")) { +// sendMessageToBotsChannel("I see you " + "this.getName()" + ". You obviously out in these streets, I'ma make sure I put some respek on your name."); +// sendMessageToBotsChannel(Images.makeImages(4)); +// break; +// } else if (fourthResponse.equalsIgnoreCase("a")) { +// sendMessageToBotsChannel("b or c son, it's up to you."); +// sendMessageToBotsChannel(Images.makeImages(3)); +// break; +// } +// } else if (thirdResponse.equalsIgnoreCase("b") || thirdResponse.equalsIgnoreCase("c")) { +// sendMessageToBotsChannel("Wrong answer, that's not a good look. It was a."); +// sendMessageToBotsChannel(Images.makeImages(2)); +// break; +// } else { +// sendMessageToBotsChannel("Yo, a, b or c only homie."); +// //played yourself gif +// sendMessageToBotsChannel(Images.makeImages(0)); +// break; +// +// } +// } else if (secondResponse.equalsIgnoreCase("a") || secondResponse.equalsIgnoreCase("c")) { +// sendMessageToBotsChannel("Good for you, obviously you ain't neva been in one-the answer was b."); +// sendMessageToBotsChannel(Images.makeImages(1)); +// break; +// //2nd question +// } else { +// sendMessageToBotsChannel("Yo, a, b or c only homie."); +// sendMessageToBotsChannel(Images.makeImages(0)); +// break; +// //post this image: http://giphy.com/gifs/zNXvBiNNcrjDW +// } +// +// } else { +// sendMessageToBotsChannel("Nah son, you 'bout to play so get ready."); +// } +// } +// } + + + + + + + + +// public Bot() { +// +// +// } + + /** + * Sample method: tests the Slack API. Prints a message indicating success or failure. + */ + public void testApi() { + Response apiTest = Slack.testApi(); + System.out.println("API OK: " +apiTest.isOk() + "\n"); + } + + /** + * Sample method: prints all public AccessCode3-3 channel names and ids. Prints an error message on failure. + */ +// public void listChannels() { +// ListChannelsResponse listChannelsResponse = Slack.listChannels(); +// +// if (listChannelsResponse.isOk()) { +// List channels = listChannelsResponse.getChannels(); +// +// System.out.println("\nChannels: "); +// for (Channel channel : channels) { +// System.out.println("name: " + channel.getName() + ", id:" + channel.getId()); +// } +// } else { +// System.err.print("Error listing channels: " + listChannelsResponse.getError()); +// } +// } + + /** + * Sample method: prints up to the last 100 messages from a given channel. Prints an error message on failure. + * or failure. + * + * @param channelId id of the given channel. + */ +// public void listMessages(String channelId) { +// ListMessagesResponse listMessagesResponse = Slack.listMessages(channelId); +// +// if (listMessagesResponse.isOk()) { +// List messages = listMessagesResponse.getMessages(); +// +// System.out.println("\nMessages: "); +// for (Message message : messages) { +// System.out.println(); +// System.out.println("Timestamp: " + message.getTs()); +// System.out.println("Message: " + message.getText()); +// } +// } else { +// System.err.print("Error listing messages: " + listMessagesResponse.getError()); +// } +// } + + /** + * Sample method: sends a plain text message to the #bots channel. Prints a message indicating success or failure. + * + * @param text message text. + */ +// public void sendMessageToBotsChannel(String text) { +// SendMessageResponse sendMessageResponse = Slack.sendMessage(text); +// +// if (sendMessageResponse.isOk()) { +// System.out.println("Message sent successfully!"); +// } else { +// System.err.print("Error sending message: " + sendMessageResponse.getError()); +// } +// } /** * Sample method: deletes a message from the #bots channel. Prints a message indicating success or failure. diff --git a/src/nyc/c4q/ramonaharrison/Main.java b/src/nyc/c4q/ramonaharrison/Main.java index 933e92b..3de735f 100644 --- a/src/nyc/c4q/ramonaharrison/Main.java +++ b/src/nyc/c4q/ramonaharrison/Main.java @@ -1,10 +1,11 @@ package nyc.c4q.ramonaharrison; import nyc.c4q.ramonaharrison.network.Slack; +import nyc.c4q.ramonaharrison.util.Quiz; public class Main { - public static void main(String[] args) { + public static void main(String[] args) throws InterruptedException { Bot myBot = new Bot(); @@ -14,11 +15,23 @@ public static void main(String[] args) { myBot.listMessages(Slack.BOTS_CHANNEL_ID); - // Post "Hello, world!" to the #bots channel - //myBot.sendMessage("Hello, world!"); + // Quiz.quiz(); + // Post "Hello, world!" to the #bots channel + // myBot.sendMessageToBotsChannel(quiz()); // Post a pineapple photo to the #bots channel //myBot.sendMessage("http://weknowyourdreams.com/images/pineapple/pineapple-07.jpg"); +//myBot.deleteMessageInBotsChannel("1474086468.000821"); +// myBot.deleteMessageInBotsChannel("1474222673.002704"); +// myBot.deleteMessageInBotsChannel("1474222733.002711"); +// myBot.deleteMessageInBotsChannel("1474223222.002729"); +// myBot.deleteMessageInBotsChannel("1474223316.002735"); + myBot.deleteMessageInBotsChannel("1474223811.002831"); + myBot.deleteMessageInBotsChannel("1474223970.002865"); + + + + } } \ No newline at end of file diff --git a/src/nyc/c4q/ramonaharrison/model/Attachment.java b/src/nyc/c4q/ramonaharrison/model/Attachment.java index 8b9d1ef..2385ef5 100644 --- a/src/nyc/c4q/ramonaharrison/model/Attachment.java +++ b/src/nyc/c4q/ramonaharrison/model/Attachment.java @@ -1,7 +1,11 @@ package nyc.c4q.ramonaharrison.model; +import org.json.simple.JSONArray; import org.json.simple.JSONObject; +import java.util.ArrayList; +import java.util.List; + /** * Created by Ramona Harrison * on 8/26/16 @@ -13,27 +17,134 @@ public class Attachment { - // TODO: implement private fields for each of the following attachment JSON keys: - // "fallback" - // "color" - // "pretext" - // "author_name" - // "author_link" - // "author_icon" - // "title" - // "title_link" - // "text" - // "fields" - // "image_url" - // "thumb_url" - // "footer" - // "footer_icon" - // "ts" + private String fallback; + private String color; + private String pretext; + private String authorName; + private String authorLink; + private String authorIcon; + private String title; + private String titleLink; + private String text; + private List fields; + private String imageUrl; + private String thumbUrl; + private String footer; + private String footerIcon; + private long ts; public Attachment(JSONObject json) { // TODO: parse an attachment from the incoming json + if (json.containsKey("fallback")) { + this.fallback = (String) json.get("fallback"); //casting this object to a string + } + if (json.containsKey("fields")) { + JSONArray jsonFields = (JSONArray) json.get("fields"); //casting this object to a JSON array + this.fields = new ArrayList(); + for (int i = 0; i < jsonFields.size(); i++) { + Field field = new Field((JSONObject) jsonFields.get(i)); + this.fields.add(field); + } + } + if (json.containsKey("ts")) { + this.ts = (Long) json.get("ts"); + } + if (json.containsKey("color")) { + this.color = (String) json.get("color"); + } + if (json.containsKey("pretext")) { + this.pretext = (String) json.get("pretext"); + } + if (json.containsKey("authorName")) { + this.authorName = (String) json.get("authorName"); + } + if (json.containsKey("authorLink")) { + this.authorLink = (String) json.get("authorLink"); + } + if (json.containsKey("authorIcon")) { + this.authorIcon = (String) json.get("authorIcon"); + } + if (json.containsKey("title")) { + this.title = (String) json.get("title"); + } + if (json.containsKey("titleLink")) { + this.titleLink = (String) json.get("titleLink"); + } + if (json.containsKey("text")) { + this.text = (String) json.get("text"); + } + if (json.containsKey("imageUrl")) { + this.imageUrl = (String) json.get("imageUrl"); + } + if (json.containsKey("thumbUrl")) { + this.thumbUrl = (String) json.get("thumbUrl"); + } + if (json.containsKey("footer")) { + this.footer = (String) json.get("footer"); + } + if (json.containsKey("footerIcon")) { + this.footerIcon = (String) json.get("footer"); + } + + } + + public String getFallback() { + return fallback; + } + + public String getColor() { + return color; + } + + public String getPretext() { + return pretext; + } + + public String getAuthorName() { + return authorName; + } + + public String getAuthorLink() { + return authorLink; + } + + public String getAuthorIcon() { + return authorIcon; + } + + public String getTitle() { + return title; + } + + public String getTitleLink() { + return titleLink; + } + + public String getText() { + return text; + } + + public List getFields() { + return fields; } - // TODO add getters to access private fields + public String getImageUrl() { + return imageUrl; + } + public String getThumbUrl() { + return thumbUrl; + } + + public String getFooter() { + return footer; + } + + public String getFooterIcon() { + return footerIcon; + } + + public long getTs() { + return ts; + } } diff --git a/src/nyc/c4q/ramonaharrison/model/Field.java b/src/nyc/c4q/ramonaharrison/model/Field.java new file mode 100644 index 0000000..41ebcc5 --- /dev/null +++ b/src/nyc/c4q/ramonaharrison/model/Field.java @@ -0,0 +1,36 @@ +package nyc.c4q.ramonaharrison.model; + +import org.json.simple.JSONObject; + +/** + * Created by shannonalexander-navarro on 9/11/16. + */ +public class Field { + private String title; + private String value; + private boolean isShort; + + public Field(JSONObject json){ + if (json.containsKey("title")){ + this.title = (String) json.get("title"); + } + if (json.containsKey("value")){ + this.value = (String) json.get("value"); + } + if (json.containsKey("short")){ + this.isShort = (boolean) json.get("short"); + } +} + + public String getTitle() { + return title; + } + + public String getValue() { + return value; + } + + public boolean isShort() { + return isShort; + } +} diff --git a/src/nyc/c4q/ramonaharrison/model/Profile.java b/src/nyc/c4q/ramonaharrison/model/Profile.java new file mode 100644 index 0000000..ecaa691 --- /dev/null +++ b/src/nyc/c4q/ramonaharrison/model/Profile.java @@ -0,0 +1,64 @@ +package nyc.c4q.ramonaharrison.model; + +import org.json.simple.JSONObject; + +import java.util.AbstractMap; + +/** + * Created by shannonalexander-navarro on 9/11/16. + */ +public class Profile { + private String firstName; + private String lastName; + private String realName; + private String email; + private String skype; + private String phone; + private String image24; + private String image32; + private String image48; + private String image72; + private String image192; + private String image512; + + public Profile(JSONObject json) { + + + if (json.containsKey("firstName")) { + this.firstName = (String) json.get("firstName"); + } + if (json.containsKey("lastName")) { + this.lastName = (String) json.get("lastName"); + } + if (json.containsKey("realName")) { + this.realName = (String) json.get("realName"); + } + if (json.containsKey("email")) { + this.email = (String) json.get("email"); + } + if (json.containsKey("skype")) { + this.skype = (String) json.get("skype"); + } + if (json.containsKey("phone")) { + this.phone = (String) json.get("phone"); + } + if (json.containsKey("image24")) { + this.image24 = (String) json.get("image24"); + } + if (json.containsKey("image32")) { + this.image32 = (String) json.get("image32"); + } + if (json.containsKey("image48")) { + this.image48 = (String) json.get("image48"); + } + if (json.containsKey("image72")) { + this.image72 = (String) json.get("image72"); + } + if (json.containsKey("image192")) { + this.image192 = (String) json.get("image192"); + } + if (json.containsKey("image512")) { + this.image512 = (String) json.get("image512"); + } + } +} diff --git a/src/nyc/c4q/ramonaharrison/model/User.java b/src/nyc/c4q/ramonaharrison/model/User.java index bc309eb..41af6b6 100644 --- a/src/nyc/c4q/ramonaharrison/model/User.java +++ b/src/nyc/c4q/ramonaharrison/model/User.java @@ -1,5 +1,6 @@ package nyc.c4q.ramonaharrison.model; +import com.sun.org.apache.xpath.internal.operations.Bool; import org.json.simple.JSONObject; /** @@ -14,23 +15,111 @@ public class User { // TODO: implement private fields for each of the following user JSON keys: - // "id" - // "name" - // "deleted" - // "color" - // "profile" - // "is_admin" - // "is_owner" - // "is_primary_owner" - // "is_restricted" - // "is_ultra_restricted" - // "has_2fa" - // "two_factor_type" - // "has_files" + private String id; + private String name; + private boolean deleted; + private String color; + private Profile profile; + private boolean isAdmin; + private boolean isOwner; + private boolean isPrimaryOwner; + private boolean isRestricted; + private boolean isUltraRestricted; + private boolean has2fa; + private String twoFactorType; + private boolean hasFiles; public User(JSONObject json) { // TODO: parse a user from the incoming json + if (json.containsKey("id")) { + this.id = (String) json.get("id"); //casting this object to a string + } + if (json.containsKey("name")) { + this.name = (String) json.get("name"); //casting this object to a string + } + if (json.containsKey("deleted")) { + this.deleted = (boolean) json.get("deleted"); + } + if (json.containsKey("color")) { + this.color = (String) json.get("deleted"); + } + if (json.containsKey("isAdmin")) { + this.isAdmin = (boolean) json.get("isAdmin"); + } + if (json.containsKey("isOwner")) { + this.isOwner = (boolean) json.get("isOwner"); + } + if (json.containsKey("isPrimaryOwner")) { + this.isPrimaryOwner = (Boolean) json.get("isPrimaryOwner"); + } + if (json.containsKey("isRestricted")) { + this.isRestricted = (boolean) json.get("isRestricted"); + } + if (json.containsKey("isUltraRestricted")) { + this.isUltraRestricted = (boolean) json.get("isUltraRestricted"); + } + if (json.containsKey("has2fa")) { + this.has2fa = (boolean) json.get("has2fa"); + } + if (json.containsKey("twoFactorType")) { + this.twoFactorType = (String) json.get("twoFactorType"); + } + if (json.containsKey("hasFiles")) { + this.hasFiles = (boolean) json.get("hasFiles"); + } } // TODO add getters to access private fields + + public String getId() { + return id; + } + + public String getName() { + return name; + } + + public boolean getDeleted() { + return deleted; + } + + public String getColor() { + return color; + } + + public boolean getAdmin() { + return isAdmin; + } + + public boolean getOwner() { + return isOwner; + } + + public boolean getPrimaryOwner() { + return isPrimaryOwner; + } + + public boolean getRestricted() { + return isRestricted; + } + + public boolean getUltraRestricted() { + return isUltraRestricted; + } + + public boolean getHas2fa() { + return has2fa; + } + + public String getTwoFactorType() { + return twoFactorType; + } + + public boolean getHasFiles() { + return hasFiles; + } + + public Profile getProfile() { + return profile; + } } diff --git a/src/nyc/c4q/ramonaharrison/network/Slack.java b/src/nyc/c4q/ramonaharrison/network/Slack.java index 87521bd..f200c1e 100644 --- a/src/nyc/c4q/ramonaharrison/network/Slack.java +++ b/src/nyc/c4q/ramonaharrison/network/Slack.java @@ -22,6 +22,7 @@ public class Slack { private static final String API_KEY = Token.findApiToken(); private static final String BASE_URL = "https://slack.com/api/"; + private static final String USER_NAME = "testy"; private static final String ENDPOINT_TEST = "api.test"; private static final String ENDPOINT_LIST_CHANNELS = "channels.list"; private static final String ENDPOINT_LIST_MESSAGES = "channels.history"; @@ -82,7 +83,7 @@ public static SendMessageResponse sendMessage(String messageText) { throw new RuntimeException(e); } - URL sendMessageUrl = HTTPS.stringToURL(BASE_URL + ENDPOINT_POST_MESSAGE + "?token=" + API_KEY + "&channel=" + BOTS_CHANNEL_ID + "&text=" + messageText); + URL sendMessageUrl = HTTPS.stringToURL(BASE_URL + ENDPOINT_POST_MESSAGE + "?token=" + API_KEY + "&username"+USER_NAME+"&channel=" + BOTS_CHANNEL_ID + "&text=" + messageText); return new SendMessageResponse(HTTPS.get(sendMessageUrl)); } diff --git a/src/nyc/c4q/ramonaharrison/util/Images.java b/src/nyc/c4q/ramonaharrison/util/Images.java new file mode 100644 index 0000000..6203c46 --- /dev/null +++ b/src/nyc/c4q/ramonaharrison/util/Images.java @@ -0,0 +1,25 @@ +package nyc.c4q.ramonaharrison.util; + +/** + * Created by shannonalexander-navarro on 9/17/16. + */ +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class Images { + + public static String makeImages(int index) { + List arrayList = new ArrayList<>(Arrays.asList( + "http://giphy.com/gifs/zNXvBiNNcrjDW", + "https://www.pinterest.com/pin/450219293971343848/", + "https://media1.giphy.com/media/4nRiHFFTzmJZC/giphy.gif", + "https://giphy.com/gifs/poopourri-xT8qBqBb9alWcVGeJy", + "http://giphy.com/gifs/name-respek-aKx78YHK83oly" + )); + return arrayList.get(index); + } + + + +} diff --git a/src/nyc/c4q/ramonaharrison/util/Quiz.java b/src/nyc/c4q/ramonaharrison/util/Quiz.java new file mode 100644 index 0000000..4f1fce1 --- /dev/null +++ b/src/nyc/c4q/ramonaharrison/util/Quiz.java @@ -0,0 +1,77 @@ +package nyc.c4q.ramonaharrison.util; + +import nyc.c4q.ramonaharrison.model.Message; +import nyc.c4q.ramonaharrison.network.Slack; +import nyc.c4q.ramonaharrison.network.response.ListMessagesResponse; + +import java.util.List; + +/** + * Created by shannonalexander-navarro on 9/17/16. + */ +public class Quiz { + public static void quiz() throws InterruptedException { + Slack.sendMessage("Yo bot channel 'bout to be lit g! You goody?"); + + boolean playing = true; + + while (playing) { + ListMessagesResponse listMessagesResponse = Slack.listMessages(Slack.BOTS_CHANNEL_ID); + List messages = listMessagesResponse.getMessages(); + String firstResponse = messages.get(0).getText(); + String secondResponse; + boolean isAnswerOk = true; + + if (firstResponse.equalsIgnoreCase("y") || firstResponse.equalsIgnoreCase("yes")) { + Slack.sendMessage("Aight fam, it's gonna go like this- I give you a word, you tell me what it means. You feel me? " + + "Pick a, b, or c, aight? " + + "\n1st question: The word is Situationship. As in \"Sounds like you in a situationship\"." + + "\na)A situation b)Playing at being in a relationship without actually being in one c)A committed relationship"); + while (isAnswerOk) { + ListMessagesResponse listMessagesResponse1 = Slack.listMessages(Slack.BOTS_CHANNEL_ID); + messages = listMessagesResponse1.getMessages(); + secondResponse = messages.get(0).getText(); + if (secondResponse.equalsIgnoreCase("b")) { + Slack.sendMessage("I see you " + "this.getName()" + ". You obviously out in these streets, I'ma make sure I put some respek on your name."); + Slack.sendMessage(Images.makeImages(4)); + playing = false; + isAnswerOk = false; + } else if (secondResponse.equalsIgnoreCase("a") || secondResponse.equalsIgnoreCase("c")) { + Slack.sendMessage("Good for you, obviously you ain't neva been in one-the answer was b."); + Slack.sendMessage(Images.makeImages(1)); + playing = false; + isAnswerOk = false; + } + } + + } else if (firstResponse.equalsIgnoreCase("n") || firstResponse.equalsIgnoreCase("no")) { + Slack.sendMessage("Nah son, you 'bout to play so get ready."); + Slack.sendMessage("Aight fam, it's gonna go like this- I give you a word, you tell me what it means. You feel me? " + + "Pick a, b, or c, aight? " + + "\n1st question: The word is Situationship. As in \"Sounds like you in a situationship\"." + + "\na)A situation b)Playing at being in a relationship without actually being in one c)A committed relationship"); + Thread.sleep(5000); + + ListMessagesResponse listMessagesResponse1 = Slack.listMessages(Slack.BOTS_CHANNEL_ID); + messages = listMessagesResponse1.getMessages(); + secondResponse = messages.get(0).getText(); + if (secondResponse.equalsIgnoreCase("b")) { + Slack.sendMessage("I see you. You obviously out in these streets, I'ma make sure I put some respek on your name."); + Slack.sendMessage(Images.makeImages(4)); + playing = false; + + } else if (secondResponse.equalsIgnoreCase("a") || secondResponse.equalsIgnoreCase("c")) { + Slack.sendMessage("Good for you, obviously you ain't neva been in one-the answer was b."); + Slack.sendMessage(Images.makeImages(1)); + } else { + Slack.sendMessage("Yo, a, b or c only homie."); + Slack.sendMessage(Images.makeImages(0)); + playing = false; + + } + } + + } + } + +}