slack- Haskell API for interacting with Slack

Safe HaskellNone




data Message Source

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

newtype TimeStamp Source

Fixed point number with 12 decimal places of precision




utcTime :: UTCTime

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

postMessage :: String -> String -> Channel -> Slack TimeStamp Source

Posts a message as the given user to the given channel. Returns the timestamp of the message, if successful