diff options
author | Teddy Wing | 2017-08-01 23:51:28 +0200 |
---|---|---|
committer | Teddy Wing | 2017-08-01 23:51:28 +0200 |
commit | a1c7bde56adbe85ef81c0e9aaced869f16f864c1 (patch) | |
tree | 1491f8710b15a399d13c07d8731b9640f8b3df46 /src/Message.hs | |
parent | 8b8c6864b7b1c2edcd93ce75393cef36883622b9 (diff) | |
download | sorbot-a1c7bde56adbe85ef81c0e9aaced869f16f864c1.tar.bz2 |
Add `Message` types
Add a few types to collect properties of a message, including message
body, channel posted to, and sender.
Need something like this for the GitHub Commit plugin, where we need
access to the message to get the SHA, and we need the channel to get the
repo URL from the database.
Diffstat (limited to 'src/Message.hs')
-rw-r--r-- | src/Message.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Message.hs b/src/Message.hs new file mode 100644 index 0000000..6a95638 --- /dev/null +++ b/src/Message.hs @@ -0,0 +1,15 @@ +module Message + ( Message(..) + , Channel + , Nick + ) where + +type Channel = String + +type Nick = String + +data Message = Message + { text :: String + , channel :: Channel + , nick :: Nick + } |