basic Lua 5.4 implementation with few example commands

This commit is contained in:
Priler
2026-01-17 05:46:38 +05:00
parent 11c2500d9c
commit 7440baa1b2
35 changed files with 2554 additions and 460 deletions

View File

@@ -0,0 +1,21 @@
-- simple test hello command
local lang = jarvis.context.language
local hour = tonumber(jarvis.context.time.hour)
-- determine greeting based on time
local greeting
if hour >= 5 and hour < 12 then
greeting = lang == "ru" and "Доброе утро" or "Good morning"
elseif hour >= 12 and hour < 17 then
greeting = lang == "ru" and "Добрый день" or "Good afternoon"
elseif hour >= 17 and hour < 22 then
greeting = lang == "ru" and "Добрый вечер" or "Good evening"
else
greeting = lang == "ru" and "Доброй ночи" or "Good night"
end
jarvis.log("info", "Greeting user: " .. greeting)
jarvis.audio.play_reply()
return { chain = true }