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

10
LINES

< > BotCompany Repo | #1012110 // ai_activeSpec_answerChatLine - posts answer to chat if there is an "X answers Y" relation

JavaX fragment (include)

static void ai_activeSpec_answerChatLine(S line) {
  ret if ai_textOfChatLine(line) == null;
  ret unless is(line, 'recent);
  ret if has(line, "was", "answered in the chat");
  S a = ai_text("$X", "answers", line);
  ret if empty(a);
  if (swic(line, "smart bot's chat")
    ? postToSmartBotsChat(a) : postToStefansChat(a))
    post(line, "was", "answered in the chat");
}

Author comment

Began life as a copy of #1011654

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: #1012110
Snippet name: ai_activeSpec_answerChatLine - posts answer to chat if there is an "X answers Y" relation
Eternal ID of this version: #1012110/5
Text MD5: a9944de691dd07ccced73b149d83ba15
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-26 22:28:15
Source code size: 382 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 386 / 418
Version history: 4 change(s)
Referenced in: [show references]