diff options
| author | LLLL Colonq <llll@colonq> | 2026-04-21 02:51:31 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-04-21 02:51:31 -0400 |
| commit | 6070421019832c94e48b988ac996bf99cf3ccd5f (patch) | |
| tree | 0fc3d917b1380b7062e75bead323b5b37592a564 /fig-monitor-twitch/src/Fig/Monitor/Twitch | |
| parent | 7a07562c61091178e540803a8c70ce5d088c5dfa (diff) | |
fig-monitor-twitch: Send username in addition to display name
Diffstat (limited to 'fig-monitor-twitch/src/Fig/Monitor/Twitch')
| -rw-r--r-- | fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs b/fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs index 92f6830..4886ffb 100644 --- a/fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs +++ b/fig-monitor-twitch/src/Fig/Monitor/Twitch/Chatbot.hs @@ -46,10 +46,11 @@ twitchChatbot cfg busAddr = do cmds.publish "fig monitor twitch chat user-notice" . encodeUtf8 $ Text.unwords msg.params "PRIVMSG" | Just displaynm <- Map.lookup "display-name" msg.tags + , Just pfx <- msg.prefix , Nothing <- Map.lookup "custom-reward-id" msg.tags -> do log $ "Received chat message from: " <> displaynm cmds.publish "fig monitor twitch chat incoming" . encodeUtf8 . Text.unwords $ - [ displaynm + [ displaynm, "\t", fst $ Text.breakOn "!" pfx , Text.intercalate "\n" $ (\(key, v) -> key <> "\t" <> v) <$> Map.toList msg.tags ] <> drop 1 msg.params _ -> pure () |
