Commit f56370d4 authored by Nicolas Lenz's avatar Nicolas Lenz

Merge branch 'master' of git.eisfunke.com:software/mock-telegram-bot

parents 6b4798d8 07c4c013
......@@ -41,7 +41,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