Commit 07c4c013 authored by Nicolas Lenz's avatar Nicolas Lenz

Fix #6

parent c0d05455
......@@ -40,7 +40,9 @@ mockify = UpdateParser f where
message <- Telegram.updateMessage update
txt <- Telegram.messageText message
let styleNames = T.splitOn "|" . T.toLower . head . T.words $ txt
case concatMaybeFunctions . map (\s -> lookup s styles) $ styleNames of
if length styleNames > 5 then
return $ Reply "Only concatenations of up to 5 styles are allowed."
else case concatMaybeFunctions . map (\s -> lookup s styles) $ styleNames of
Nothing -> return $ SendHelp
Just f -> return $ Reply $ f (T.unwords $ tail $ T.words txt)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment