Copyright | Alexander Krupenkin 2016 |
---|---|
License | BSD3 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Story is a dialog like abstraction for processing sparsed by messages data from user.
hello :: Monad m => Text -> Text -> Int -> m BotMessage hello name surname age = toMessage $ "Hello, " <> name <> " " <> surname <> "!n" <> "You lost " <> (T.pack $ show age) <> " years =)" helloStory :: BotConfig a => Story a helloStory _ = hello $ question "How your name?" * question "How your surname?" * question "How old are you?"