18 lines
534 B
Lua
18 lines
534 B
Lua
|
|
jarvis.scheduler.remove("habit_water")
|
|||
|
|
local ok, err = pcall(function()
|
|||
|
|
jarvis.scheduler.add({
|
|||
|
|
id = "habit_water",
|
|||
|
|
name = "Drink water",
|
|||
|
|
schedule = "every 2 hours",
|
|||
|
|
action = { type = "speak", text = "Попей воды." }
|
|||
|
|
})
|
|||
|
|
end)
|
|||
|
|
if not ok then
|
|||
|
|
jarvis.speak("Не получилось.")
|
|||
|
|
jarvis.audio.play_error()
|
|||
|
|
return { chain = false }
|
|||
|
|
end
|
|||
|
|
jarvis.speak("Каждые 2 часа буду напоминать пить воду.")
|
|||
|
|
jarvis.audio.play_ok()
|
|||
|
|
return { chain = false }
|