local helper = jarvis.context.command_path .. "\\_sysinfo.ps1" local cmd = string.format('powershell -NoProfile -ExecutionPolicy Bypass -File "%s" -Topic battery', helper) local res = jarvis.system.exec(cmd) local text = (res.stdout or ""):gsub("[\r\n]+$", "") if not res.success or text == "" then jarvis.log("error", "battery info failed: " .. tostring(res.stderr)) return jarvis.cmd.error("Не получилось узнать заряд.") end jarvis.system.notify("Батарея", text) jarvis.log("info", text) return jarvis.cmd.ok(text)