summaryrefslogtreecommitdiff
path: root/fig-monitor-twitch/main/Main.hs
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2024-07-31 22:59:58 -0400
committerLLLL Colonq <llll@colonq>2024-07-31 22:59:58 -0400
commit7ffb7b021eec46f2d714e04b47d752012e1bf8ea (patch)
tree15d9af7555300bd2b452dda55747cf5870b747d3 /fig-monitor-twitch/main/Main.hs
parent92556dc23ead56ed2c2d2bcc752fe0e7378fa022 (diff)
Frontend updates
Diffstat (limited to 'fig-monitor-twitch/main/Main.hs')
-rw-r--r--fig-monitor-twitch/main/Main.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/fig-monitor-twitch/main/Main.hs b/fig-monitor-twitch/main/Main.hs
index 2232a03..05f3cdb 100644
--- a/fig-monitor-twitch/main/Main.hs
+++ b/fig-monitor-twitch/main/Main.hs
@@ -11,12 +11,14 @@ data Command
= Monitor
| Chatbot
| RedirectServer
+ | Validate
parseCommand :: Parser Command
parseCommand = subparser $ mconcat
[ command "monitor" $ info (pure Monitor) (progDesc "Launch the Twitch monitor")
, command "chatbot" $ info (pure Chatbot) (progDesc "Launch the Twitch chatbot")
, command "user-token-server" $ info (pure RedirectServer) (progDesc "Launch a web server to handle authentication redirects")
+ , command "validate-endpoint" $ info (pure Validate) (progDesc "Test Twitch authentication")
]
data Opts = Opts
{ busHost :: Text
@@ -43,3 +45,4 @@ main = do
Monitor -> twitchEventClient cfg (opts.busHost, opts.busPort)
Chatbot -> twitchChatClient cfg (opts.busHost, opts.busPort)
RedirectServer -> userTokenRedirectServer cfg
+ Validate -> twitchEndpointTest cfg