Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

24
LINES

< > BotCompany Repo | #1002277 // Tagging Compo Test (depends on getBot)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Transpiled version (971L) is out of date.

!752

static class SlackMsg {
  S user, botName; // one of these is going to be set
  S userName; // looked up if user != null
  S type, text, ts;
  O reactions;
  S channelID;
}

p {
  // probably one should be synchronizing these structures
  // (why are PersistentLog and PersistentMap not synchronized)?
  Map tagsByTS = cast getFromOtherBot("#1002192", "tagsByTS");
  L log = cast callOtherBot("#1002185", "getLog", "talkingbots");
  
  print("Scanning " + l(log) + " items.");
  
  for (int i = 0; i < l(log); i++) {
    SlackMsg msg = cast restructure(log.get(i)); // restructure == import into our namespace
    O tag = tagsByTS.get(msg.ts);
    print("Tag found: " + structure(tag));
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002277
Snippet name: Tagging Compo Test (depends on getBot)
Eternal ID of this version: #1002277/1
Text MD5: b708f1cc1be313a97c8fa54470cfc82b
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-04-24 20:23:05
Source code size: 721 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 597 / 560
Referenced in: [show references]