sclass AssistantRequest { Map map; // full map of parameters S token, language; S input, event; // one of these will be not empty O module; void say(S s) { if (emptyAfterTrim(s)) ret; print("Sending to " + shortenedToken() + ": " + s); dm_call(module, 'sendToUser, token, s); } S shortenedToken() { ret takeFirst(token, 8) + "..."; } }
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: | #1023383 |
Snippet name: | AssistantRequest (phone assistant) |
Eternal ID of this version: | #1023383/7 |
Text MD5: | 0899222109f49a80c8e8b7e14c7c1420 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-06-13 12:59:56 |
Source code size: | 380 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 333 / 741 |
Version history: | 6 change(s) |
Referenced in: | #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674) |