!752 static int maxQuestionLength = 150; static int maxAnswerLength = 450; answer { if "last dialogs" s = "5 last dialogs"; if "last dialog" s = "1 last dialogs"; if "* last dialogs" { int n = parseInt(m.unq(0)); L history = cast get(getMainBot(), "history"); new StringBuffer buf; int x = max(l(history)-n, 0); for (int i = l(history)-1; i >= x; i--) { O dialog = history.get(i); S q = shorten(getString(dialog, "question"), maxQuestionLength); S a = shorten(getString(dialog, "answer"), maxAnswerLength); buf.append("User: " + q + "\n"); buf.append("Eleutheria: " + a + "\n"); } ret slackSnippet(buf); } }