!7 cmodule Giraffe > DynDiscordHopper { switchable S myName = "Giraffe"; switchable S sliceID = "wgeuwbcepeoxfwma"; // "Height bot" slice - https://agi.blue/?slice=cxbfnllthxfsuwxw transient PKIKeyPair keys; start { keys = keyPairForProgram(); dm_vmBus_onMessage_q('discordGuildJoin, voidfunc(Map map) { ret unless map.get('module) == module(); //postInChannel(preferredChannelID, "I sense a joiner"); }); } @Override S answer(S input, Map map) { ret mapEachLine_tlft_nempties(input, s -> { new Matches m; if "what's your name" ret myName; if (eqic(s, "hey " + myName)) ret or2((S) random(jsonDecodeList(agiBlue_query([[ question to ask / is / $x return $x ]], slice := sliceID))), "I don't know what to ask"); null; }); } }