marvin-0.0.1: resources/initializer/MyScript.hs.mustache
module MyScript where
import Marvin.Prelude
script :: {{ scriptsig }}
script = defineScript "my-script" $ do
hear (r [CaseInsensitive] "ping") $ do -- react to any message
msg <- getMessage -- read the message contents
infoM (content msg) -- logging
send "Pong" -- sending messages back
respond "hello" $ do -- react to direct commands
reply "Hello to you too"