16 lines
436 B
Haskell
16 lines
436 B
Haskell
|
{-# Language RecordWildCards #-}
|
||
|
{-# Language OverloadedStrings #-}
|
||
|
{-# Language ScopedTypeVariables #-}
|
||
|
module Extension.Hello where
|
||
|
|
||
|
import Bot.Extension
|
||
|
import Bot.DSL
|
||
|
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
|