Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Message = Message {}
- data MessageRaw = MessageRaw {}
- convertRawMessage :: MessageRaw -> Slack Message
- newtype TimeStamp = TimeStamp {}
- timeStampToString :: TimeStamp -> String
- channelHistory :: Int -> Channel -> Slack [Message]
- channelHistoryBefore :: Int -> TimeStamp -> Channel -> Slack [Message]
- channelHistoryAll :: Channel -> Slack [Message]
- channelHistoryRecent :: Int -> Channel -> Slack [Message]
- messagesByUser :: User -> [Message] -> [Message]
- postMessage :: String -> String -> Channel -> Slack TimeStamp
Documentation
A nicer version of MessageRaw, with the user id converted to a User
data MessageRaw Source
A message sent on a channel. Message can also mean things like user joined or a message was edited TODO: Make this into a sum type of different message types, instead of using Maybe
convertRawMessage :: MessageRaw -> Slack Message Source
Converts a MessageRaw into a Message
Fixed point number with 12 decimal places of precision
timeStampToString :: TimeStamp -> String Source
Converts a TimeStamp to the timestamp format the Slack API expects
channelHistory :: Int -> Channel -> Slack [Message] Source
List of the past n messages in the given channel n must be no greater than 1000
channelHistoryBefore :: Int -> TimeStamp -> Channel -> Slack [Message] Source
Gets the n messages occuring before the given time
channelHistoryAll :: Channel -> Slack [Message] Source
Retrieves the entire channel history
channelHistoryRecent :: Int -> Channel -> Slack [Message] Source
Retrieves a list of the most recent messages within the last n seconds
messagesByUser :: User -> [Message] -> [Message] Source
Retrieves the messages by the given user