Uses 911K of libraries. Click here for Pure Java version (4455L/22K).
1 | !7 |
2 | |
3 | cmodule DiscordBotPMTest > DynPrintLogAndEnabled {
|
4 | start {
|
5 | dm_vmBus_onMessage_q incomingDiscordMessage(voidfunc(Map map) {
|
6 | if (!enabled) ret; |
7 | S s = getString content(map); |
8 | if (isTrue(map.get('fromBot))) ret;
|
9 | O module = map.get('module);
|
10 | long channelID = getLong channelID(map); |
11 | long userID = getLong userID(map); |
12 | |
13 | if "send me a pm" |
14 | dm_call(module, 'sendPM, userID, "Here's your PM, my friend"); |
15 | }); |
16 | } |
17 | } |
Began life as a copy of #1023420
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: | #1023421 |
| Snippet name: | Discord Bot PM Test |
| Eternal ID of this version: | #1023421/4 |
| Text MD5: | c694c3d1293c936fc69c79c0ce6fd2d7 |
| Transpilation MD5: | 6d3e51faa0444f2142412202d36af676 |
| 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-21 20:07:19 |
| Source code size: | 490 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 482 / 1074 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |