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

17
LINES

< > BotCompany Repo | #1003091 // simpleChatPost

JavaX fragment (include)

static S simpleChatPost(S user, S text) {
  O chat = simpleChatBot();
  if (chat == null)
    ret loadPage("http://ai1.lol/" + simpleChatID() + "/raw?robo=1&user=" + urlencode(user) + "&text=" + urlencode(text));
  else
    ret (S) call(chat, "postForeign", mc(), programID(), user, text);
}

static S simpleChatPost(S text) {
  L<S> names = cast get(mc(), "simpleChatPresence_names");
  S name;
  if (l(names) == 1)
    name = first(names);
  else
    name = programID();
  ret simpleChatPost(name, text);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003091
Snippet name: simpleChatPost
Eternal ID of this version: #1003091/1
Text MD5: 5720dadcbeb718e0b5f300254cff3c48
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-06-06 00:50:14
Source code size: 524 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 606 / 590
Referenced in: [show references]