svoid gazelle_mathBot1_handlePost(S _user, S _botToken, Map post) { Number postID = cast post.get("id"); S text = cast post.get("text"); LS groups = regexpGroupsIC("What is (\\d+)\\s*\\+\\s*(\\d+)", text); if (empty(groups)) ret; print("Processing post " + postID + ": " + quote(text)); BigInt result = plus(parseBigInt(first(groups)), parseBigInt(second(groups))); print("Calculated result: " + result); print(postJSONPage("https://gazelle.rocks/bot/createPost", +_user, +_botToken, refs := postID, text := "The result is " + result, type := "Answer", botInfo := "Math bot")); }