Libraryless. Click here for Pure Java version (293L/3K/8K).
1 | !752 |
2 | |
3 | static S token; |
4 | static S channelID = "C0FH9PY8J"; // #talkingbots |
5 | static S text = "Bot test"; |
6 | static S username = "botstuff"; |
7 | |
8 | p { |
9 | token = loadSecretTextFileMandatory("relp-slack-botstuff-token").trim(); |
10 | S url = "https://slack.com/api/chat.postMessage"; |
11 | S postData = "token=" + urlencode(token) + "&channel=" + urlencode(channelID) + "&text=" + urlencode(text) |
12 | + "&username=" + urlencode(username); |
13 | S data = doPost(postData, url); |
14 | print(data); |
15 | } |
Began life as a copy of #1001888
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
ID | Author/Program | Comment | Date |
---|---|---|---|
1186 | stefan | Works :) | 2015-12-05 00:57:18 |
Snippet ID: | #1001889 |
Snippet name: | Try posting in Slack chat as "botstuff" |
Eternal ID of this version: | #1001889/1 |
Text MD5: | 266a457fa347f693f10eaec68a1b2c2f |
Transpilation MD5: | 4c6741eb22b13fd530c352db75e030c1 |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-12-06 18:29:07 |
Source code size: | 481 bytes / 15 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 965 / 2427 |
Referenced in: | [show references] |