local list = jarvis.macros.list() if #list == 0 then return jarvis.cmd.ok("Макросов нет.") end local sample = math.min(#list, 5) local line = string.format("Макросов: %d. ", #list) for i = 1, sample do line = line .. list[i].name .. " (" .. list[i].steps_count .. " шагов)" if i < sample then line = line .. ", " end end return jarvis.cmd.ok(line .. ".")