| Copyright | (c) Justus Adam 2016 |
|---|---|
| License | BSD3 |
| Maintainer | dev@justus.science |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Marvin.Run
Description
- runMarvin :: forall a. IsAdapter a => [ScriptInit a] -> IO ()
- data ScriptInit a
- class IsAdapter a
- requireFromAppConfig :: Configured a => Config -> Name -> IO a
- lookupFromAppConfig :: Configured a => Config -> Name -> IO (Maybe a)
- defaultConfigName :: FilePath
Documentation
runMarvin :: forall a. IsAdapter a => [ScriptInit a] -> IO () Source #
Runs the marvin bot using whatever method the adapter uses.
data ScriptInit a Source #
Initializer for a script. This gets run by the server during startup and creates a Script
Basic functionality required of any adapter
Minimal complete definition
adapterId, messageChannel, initAdapter, runWithAdapter, getUsername, getChannelName, resolveChannel, resolveUser
Instances
requireFromAppConfig :: Configured a => Config -> Name -> IO a Source #
Retrieve a value from the application config, given the whole config structure. Fails if value not parseable as a or not present.
lookupFromAppConfig :: Configured a => Config -> Name -> IO (Maybe a) Source #
Retrieve a value from the application config, given the whole config structure. Returns Nothing if value not parseable as a or not present.
defaultConfigName :: FilePath Source #
Default name for the config file