{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Extension.Hello where import Bot.DSL import Bot.Extension import qualified Data.Text as T extension :: Extension () extension = Extension{..} where name = "hello world" act Request{..} | "hello" `T.isPrefixOf` content = return $ Just $ Response "Hello to you" () | otherwise = return Nothing