sS philosophyBotWithFactStore_discordAnswer(S theory, SimpleFactStore factStore, S s, O... _) { ret philosophyBotWithFactStore_discordAnswer(new PhilosophyBot1(theory), factStore, s, _); } sS philosophyBotWithFactStore_discordAnswer(PhilosophyBot1 bot, SimpleFactStore factStore, S s, O... _) { optPar long userID; optPar bool fromBot; print(userID + " (" + (fromBot ? "bot" : "human") + "): " + s); S user = "(user " + userID + ")"; if (factStore != null) { factStore.onChange(r change); factStore.verbose = true; philosophyBot1_factStore(bot, factStore); } bot.standardImports(); bot.autoOpenTheories(); bot.addFact(user + " is a " + (fromBot ? "bot" : "human")); bot.addFact(user + " says (" + bot.sanitizeInput(s) + ")"); bot.run(); ret first(bot.matchFacts("$x", "say $x")); }