Skip to content

Commit aca410a

Browse files
author
Cat Wong
committed
fourth commit
1 parent 7be2f2b commit aca410a

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

src/nyc/c4q/ramonaharrison/Bot.java

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,18 @@ public void respondGreeting(String channelId) {
6767

6868
for (Message message : messages) {
6969

70-
String whatDidYouSay = message.getText();
71-
72-
if (whatDidYouSay.contains("@U2ADRJVK9") || whatDidYouSay.contains("messybot")) {
73-
if (whatDidYouSay.contains("Give me a word and I'll find it for you.")) {
74-
75-
} else {
76-
if (message.getUser() != null) {
77-
78-
myBot.sendMessage("Hello " + message.getUser().toString());
70+
String whatDidYouSay = "";
71+
whatDidYouSay = message.getText();
72+
if (whatDidYouSay.contains("@U2ADRJVK9") || whatDidYouSay.contains("messybot")) {
73+
if (message.getUser() != null) {
74+
75+
myBot.sendMessage("Hello " + message.getUser().toString());
76+
}
77+
myBot.sendMessage("I am messybot");
78+
myBot.sendMessage(":poop::poop::poop:");
79+
myBot.sendMessage("You asked for " + whatDidYouSay);
7980
}
80-
myBot.sendMessage("I am messybot");
81-
myBot.sendMessage(":poop::poop::poop:");
82-
myBot.sendMessage("You asked for " + whatDidYouSay);
8381
}
84-
}
85-
}
8682
}else {
8783
System.err.print("Error listing messages: " + listMessagesResponse.getError());
8884
}
@@ -114,8 +110,11 @@ public void respondAll(String channelId) {
114110
String giphySearch = giphy.giphySearch();
115111

116112
myBot.sendMessage(slangSearch.toString());
113+
Slack.addReaction();
117114
myBot.sendMessage(memeSearch.toString());
115+
Slack.addReaction();
118116
myBot.sendMessage(giphySearch);
117+
Slack.addReaction();
119118
// }
120119

121120
}

src/nyc/c4q/ramonaharrison/Main.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ public static void main(String[] args){
2727

2828
myBot.respondAll("C2ADPS5MK");
2929

30-
myBot.addReaction();
31-
3230
myBot.listMessages(Slack.BOTS_CHANNEL_ID);
3331

3432

0 commit comments

Comments
 (0)