Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data BotApp model action = BotApp {
- botInitialModel :: model
- botAction :: Update -> model -> Maybe action
- botHandler :: action -> model -> Eff action model
- botJobs :: [BotJob model action]
- data BotJob model action = BotJob {
- botJobSchedule :: Text
- botJobTask :: model -> Eff action model
- startBot :: BotApp model action -> ClientEnv -> IO (Either ClientError ())
- startBot_ :: BotApp model action -> ClientEnv -> IO ()
- startBotAsync :: BotApp model action -> ClientEnv -> IO (action -> IO ())
- startBotAsync_ :: BotApp model action -> ClientEnv -> IO ()
- getEnvToken :: String -> IO Token
Documentation
data BotApp model action Source #
A bot application.
BotApp | |
|
data BotJob model action Source #
A background bot job.
BotJob | |
|
startBot :: BotApp model action -> ClientEnv -> IO (Either ClientError ()) Source #
Start bot with update polling in the main thread.
startBotAsync :: BotApp model action -> ClientEnv -> IO (action -> IO ()) Source #
Start bot with asynchronous polling. The result is a function that allows you to send actions directly to the bot.
startBotAsync_ :: BotApp model action -> ClientEnv -> IO () Source #
Like startBotAsync
, but ignores result.