blob: 861f48e47d16c980ad80ed5f1631f176b7479c04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
module CliOptions
( parseOptions
) where
import Data.Semigroup ((<>))
import Options.Applicative
data Options = Options
{ slackApiToken :: String
}
options :: Parser Options
options = Options
<$> strOption
( long "slack-token"
<> metavar "TOKEN"
<> value ""
<> help "Token to access Slack's real-time messaging API" )
parseOptions :: IO ()
parseOptions = do
execParser opts
return ()
where
opts = info (options <**> helper)
( fullDesc
<> progDesc "A chat bot with a plugin interface that does a bunch of \
\random things." )
|