Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Model = BotState
- data Action
- data Backend
- proofAssistantBot :: Model -> BotApp Model Action
- updateToAction :: Model -> Update -> Maybe Action
- handleAction :: Action -> Model -> Eff Action Model
- sendResponseBack :: Bool -> InterpreterResponse -> BotM ()
- runTelegramBot :: Model -> IO ()
- run :: IO ()
Documentation
Supported actions by bot.
Call Backend InterpreterRequest | Call backend and send request to it. |
SendBack InterpreterResponse | Send response back as reply. |
Help InterpreterRequest | Reply with help message. |
Version InterpreterRequest | Reply with version message. |
Debug String | Write in STDOUT unknown input. |
handleAction :: Action -> Model -> Eff Action Model Source #
How to handle actions after parsing updates.
sendResponseBack :: Bool -> InterpreterResponse -> BotM () Source #
Helper that will try to deliver message even when Telegram failed to send it.