summaryrefslogtreecommitdiff
path: root/fig-monitor-twitch/main/Main.hs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-03-07 23:41:50 -0500
committerLLLL Colonq <llll@colonq>2026-03-07 23:41:50 -0500
commitcb85036ca25cd9e13e4e959e105b88bb73dbf9e5 (patch)
tree93bbf019944db71482fd2f6bcd5ffe94442f9bdb /fig-monitor-twitch/main/Main.hs
parent8cbf224b0edc8646690ebbc877d6f72507447d7a (diff)
Refactor, use app tokens
Diffstat (limited to 'fig-monitor-twitch/main/Main.hs')
-rw-r--r--fig-monitor-twitch/main/Main.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/fig-monitor-twitch/main/Main.hs b/fig-monitor-twitch/main/Main.hs
index 682d35b..a370b0b 100644
--- a/fig-monitor-twitch/main/Main.hs
+++ b/fig-monitor-twitch/main/Main.hs
@@ -12,7 +12,6 @@ data Command
| Chatbot
| LiveChecker
| RedirectServer !Bool
- | Validate
parseCommand :: Parser Command
parseCommand = subparser $ mconcat
@@ -21,7 +20,6 @@ parseCommand = subparser $ mconcat
, command "live-checker" $ info (pure LiveChecker) (progDesc "Launch the Twitch live status checker")
, command "user-token-server" $ info (pure $ RedirectServer True) (progDesc "Launch a web server to handle authentication redirects")
, command "user-token-server-read-only" $ info (pure $ RedirectServer False) (progDesc "Launch a web server to handle authentication redirects")
- , command "validate-endpoint" $ info (pure Validate) (progDesc "Test Twitch authentication")
]
data Opts = Opts
{ busHost :: !Text
@@ -45,8 +43,7 @@ main = do
)
cfg <- loadConfig opts.config
case opts.command of
- Monitor -> twitchEventClient cfg (opts.busHost, opts.busPort)
- Chatbot -> twitchChatClient cfg (opts.busHost, opts.busPort)
- LiveChecker -> twitchChannelLiveMonitor cfg (opts.busHost, opts.busPort)
+ Monitor -> twitchEventMonitor cfg (opts.busHost, opts.busPort)
+ Chatbot -> twitchChatbot cfg (opts.busHost, opts.busPort)
+ LiveChecker -> twitchChannelLiveChecker cfg (opts.busHost, opts.busPort)
RedirectServer rw -> userTokenRedirectServer cfg rw
- Validate -> twitchEndpointTest cfg