Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1023383 // AssistantRequest (phone assistant)

JavaX fragment (include)

1  
sclass AssistantRequest {
2  
  Map map; // full map of parameters
3  
  S token, language;
4  
  S input, event; // one of these will be not empty
5  
  O module;
6  
  
7  
  void say(S s) {
8  
    if (emptyAfterTrim(s)) ret;
9  
    print("Sending to " + shortenedToken() + ": " + s);
10  
    dm_call(module, 'sendToUser, token, s);
11  
  }
12  
  
13  
  S shortenedToken() { ret takeFirst(token, 8) + "..."; }
14  
}

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: 332 / 740
Version history: 6 change(s)
Referenced in: [show references]