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

30
LINES

< > BotCompany Repo | #1024520 - UserSelfInfoBot

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 5795K of libraries. Click here for Pure Java version (14525L/81K).

!7

cmodule UserSelfInfoBot > DynTalkBot {
  switchable S sliceID;
  
  start {
    myName = "UserSelfInfoBot";
    sliceID = "phcrwqpsrrmxdqft";
  }

  S processSimplifiedLine(S s, O... _) {
    optPar long userID;
    S user = discordAt(userID);
    
    if "what's your name" ret myName;

    if (containsOneOfTheWords(s, ai_backReferencingWords()))
      ret null with print("Contains back-referencing word");

    S objective = switcheroo_iToName(user, s);
    print("Objective >> " + objective);
    if (!contains(objective, user))
      ret null with print("No I found");

    if (agiBlue_postInSlice_trueIfNew(sliceID, user, "fact", objective))
      ret "Thanks, I will store this. " + user;
    else
      ret "Yes I know, " + user;
  }
}

download  show line numbers  debug dex   

Travelled to 2 computer(s): mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1024520
Snippet name: UserSelfInfoBot
Eternal ID of this version: #1024520/13
Text MD5: 3cec26c91bdb36d6805fc12c62e1f881
Transpilation MD5: b82a9614d70b2f1807d63d4c8becb06e
Author: stefan
Category:
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-08 12:53:39
Source code size: 779 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 12 / 335
Version history: 12 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1024520 & http://1024520.tinybrain.de