static int slackReactionScore(S token, S channelID, S timestamp) { S url = "https://slack.com/api/reactions.get"; S postData = "token=" + urlencode(token) + "&channel=" + urlencode(channelID) + "×tamp=" + urlencode(timestamp); S data = doPostWithTimeout(postData, url, slackSetTimeout_get()); Map map = jsonDecodeMap(data); Map msg = cast map.get("message"); if (msg == null) ret 0; //printStructure(msg); L reactions = cast msg.get("reactions"); if (reactions == null) ret 0; //printStructure(reactions); int score = 0; for (Map r : reactions) { S name = cast r.get("name"); int count = (int) r.get("count"); if (litlist("confused").contains(name)) score -= count; else score += count; /*else print("Unknown reaction emoji: " + name);*/ } ret score; }