!7 set flag AllowMetaCode. set flag Reparse. meta-transformNow { tok_standardBot } standard bot TheAIShould { allServers { static noeq record Entry(S text) extends HasGlobalID {} } Map db = ciMap(); S add(S s) { if (!db.containsKey(s)) { db.put(s, new Entry(s)); change(); ret "OK, stored"; } ret "I know"; } S remove(S s) { ret db.remove(s) != null ? with(r change, "OK, then not") : "I know"; } S listWithPattern(S pat) { ret or2(lines(mapValuesToList(db, x -> discord_prependGlobalID(x) + format_ellipsis(pat, x.text))), "nothing"); } sync S processSimplifiedLine(S s, O... _) { try answer super.processSimplifiedLine(s, _); new Matches m; meta { S program = [[ The AI should ... = + The AI doesn't have to ... = - What should the AI do = listWithPattern("The AI should ...") ]]; ret ai_lineEquationsToMatchX2Statements(jreplace_multi(program, "+", "add(\\$1);", "-", "remove(\\$1);")); } null; } }