aboutsummaryrefslogtreecommitdiffstats
path: root/src/Lib.hs
blob: f8745b28b26d49b9074226744c2104f51f584765 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module Lib
    ( someFunc
    ) where

import Database.SQLite.Simple

import Message
import Plugin

someFunc :: IO ()
someFunc = do
    let message = Message
            { text    = "75ac7b18a009ffe7a77a17a61d95c01395f36b44"
            , channel = "#a-channel"
            , nick    = "anon"
            }
        Just plugin = matchPlugin message
    dbConn <- open "db/sorbot_development.sqlite3"
    response <- performPlugin plugin message dbConn
    case response of
        Left e  -> putStrLn e
        Right r -> putStrLn r
    close dbConn