Libraryless. Click here for Pure Java version (1040L/7K/23K).
1 | !752 |
2 | |
3 | answer { |
4 | if "channel name" |
5 | ret structure(getChannelName()); |
6 | |
7 | if (eq(getChannelName(), "devchannel, #talkingbots")) { |
8 | S ts = getSlackTS(); |
9 | int i = ts.indexOf('.'); |
10 | if (i >= 0) ts = substring(ts, i+1); // shorter slack timestamp |
11 | S theoryName = "tb." + getUserName() + "." + ts; |
12 | addTheory(theoryName, s); |
13 | } |
14 | } |
15 | |
16 | static void addTheory(S name, S text) { |
17 | print("addTheory => " + callOpt(getBot("#1002762"), "saveTheory", name, text, true)); |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002890 |
Snippet name: | Store All Bot (save Slack input as theories) |
Eternal ID of this version: | #1002890/1 |
Text MD5: | 17bb4809cd95f52acb57942b633d4dbc |
Transpilation MD5: | 7ec3f556dd93c064a311b19242c803c2 |
Author: | stefan |
Category: | eleu / nl |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-03-25 20:59:22 |
Source code size: | 493 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 639 / 741 |
Referenced in: | [show references] |