!747 m { p { makeAndroid("Translator Runner Bot."); } static synchronized S answer(S s) ctex { new Matches m; if (match3("please run translator * on this text: *", s, m)) { S translatorID = unquote(m.m[0]); S text = unquote(m.m[1]); S result = runTranslator(text, translatorID); return "Result: " + stringOut(result); } if (match3("please run translator * on snippet *", s, m)) { S translatorID = unquote(m.m[0]); S textID = unquote(m.m[1]); S text = loadSnippet(textID); S result = runTranslator(text, translatorID); return "Input: " + stringOut(text) + ", result: " + stringOut(result); } return null; } static synchronized S stringOut(S s) { return quote(s); } }