Uses 911K of libraries. Click here for Pure Java version (4285L/21K).
1 | !7 |
2 | |
3 | cmodule AndroidCatBot > DynPrintLogAndEnabled {
|
4 | start {
|
5 | dm_vmBus_onMessage_q incomingDiscordMessage(voidfunc(Map map) {
|
6 | if (!enabled) ret; |
7 | S input = getString content(map); |
8 | if (isTrue(map.get('fromBot))) ret;
|
9 | if (empty(input)) ret; |
10 | O module = map.get('module);
|
11 | long channelID = getLong channelID(map); |
12 | print("Have " + n2(dm_attractorBotModules(), "bot module"));
|
13 | print("> " + input);
|
14 | dm_sendToAllAttractorBots(input, voidfunc(S s) {
|
15 | print("< " + s);
|
16 | dm_call(module, 'postInChannel, channelID, s); |
17 | }); |
18 | }); |
19 | } |
20 | } |
Began life as a copy of #1023294
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1023420 |
| Snippet name: | Discord Bot Connector - connect all loaded DynAttractorBots to Discord module |
| Eternal ID of this version: | #1023420/4 |
| Text MD5: | af59fb661fd058d3fa7671c012d2f0a5 |
| Transpilation MD5: | 4f0453ac048c7a2f85f73fd0dcfd4dde |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-06-18 17:03:49 |
| Source code size: | 619 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 472 / 1097 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |