!7 set flag AllowMetaCode. standardBot1 TheAICan_v2 { allServers { static noeq record Procedure(S text) extends HasGlobalID { } static noeq record Entry(S text) extends HasGlobalID { new L how; } } 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) + appendBracketed(nMethods(x.how)) )), "nothing"); } sync S processSimplifiedLine(S s, O... _) { try answer super.processSimplifiedLine(s, _); new Matches m; meta { S program = [[ The AI can ... = + The AI can't actually ... = - What can the AI do = listWithPattern("The AI can ...") ]]; ret ai_lineEquationsToMatchX2Statements(jreplace_multi(program, "+", "add(\\$1);", "-", "remove(\\$1);")); } null; } }