-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Bindings to the Slack RTM API. -- -- This library provides bindings to the Slack Real Time Messaging -- API. Users should find it easy to program their own Slack bots -- using the functionality found in Web.Slack. The bindings are -- very nearly complete. Library authors looking to build bindings to the -- Slack Web API may find the FromJSON instances located in -- Web.Slack.Types useful. Please note that the interface provided -- by this package is not yet stable. There are a number of unresolved -- internal inconsistencies which have yet to be resolved by Slack HQ. @package slack-api @version 0.8 module Web.Slack.Types.Base type URL = Text module Web.Slack.Types.Presence data Presence Away :: Presence Active :: Presence instance GHC.Show.Show Web.Slack.Types.Presence.Presence instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Presence.Presence module Web.Slack.Types.Preferences data Preferences Preferences :: Text -> Text -> Bool -> Bool -> Maybe Text -> Bool -> Bool -> Bool -> Int -> Text -> Text -> Text -> Text -> Int -> Bool -> Bool -> Bool -> Bool -> Text -> Text -> Text -> Bool -> Text -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Text -> Bool -> Bool -> Bool -> Text -> Text -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Text -> Bool -> Bool -> Bool -> Bool -> Text -> Int -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Text -> Bool -> Bool -> Bool -> Bool -> Text -> Text -> Bool -> Bool -> Bool -> Text -> Int -> Text -> Bool -> Bool -> Bool -> Text -> Bool -> Bool -> Preferences [_prefHighlightWords] :: Preferences -> Text [_prefUserColors] :: Preferences -> Text [_prefColorNamesInList] :: Preferences -> Bool [_prefGrowlsEnabled] :: Preferences -> Bool [_prefTimezone] :: Preferences -> Maybe Text [_prefPushDmAlert] :: Preferences -> Bool [_prefPushMentionAlert] :: Preferences -> Bool [_prefPushEverything] :: Preferences -> Bool [_prefPushIdleWait] :: Preferences -> Int [_prefPushSound] :: Preferences -> Text [_prefPushLoudChannels] :: Preferences -> Text [_prefPushLoudChannelsSet] :: Preferences -> Text [_prefEmailAlerts] :: Preferences -> Text [_prefEmailAlertsSleepUntil] :: Preferences -> Int [_prefEmailMisc] :: Preferences -> Bool [_prefEmailWeekly] :: Preferences -> Bool [_prefWelcomeMessageHidden] :: Preferences -> Bool [_prefAllChannelsLoud] :: Preferences -> Bool [_prefLoudChannels] :: Preferences -> Text [_prefNeverChannels] :: Preferences -> Text [_prefLoudChannelsSet] :: Preferences -> Text [_prefShowMemberPresence] :: Preferences -> Bool [_prefSearchSort] :: Preferences -> Text [_prefExpandInlineImgs] :: Preferences -> Bool [_prefExpandSnippets] :: Preferences -> Bool [_prefPostsFormattingGuide] :: Preferences -> Bool [_prefSeenWelcome2] :: Preferences -> Bool [_prefSeenSsbPrompt] :: Preferences -> Bool [_prefSearchOnlyMyChannels] :: Preferences -> Bool [_prefEmojiMode] :: Preferences -> Text [_prefHasInvited] :: Preferences -> Bool [_prefHasUploaded] :: Preferences -> Bool [_prefHasCreatedChannel] :: Preferences -> Bool [_prefSearchExcludeChannels] :: Preferences -> Text [_prefMessagesTheme] :: Preferences -> Text [_prefWebappSpellcheck] :: Preferences -> Bool [_prefNoJoinedOverlays] :: Preferences -> Bool [_prefNoCreatedOverlays] :: Preferences -> Bool [_prefDropboxEnabled] :: Preferences -> Bool [_prefSeenDomainInviteReminder] :: Preferences -> Bool [_prefSeenMemberInviteReminder] :: Preferences -> Bool [_prefMuteSounds] :: Preferences -> Bool [_prefArrowHistory] :: Preferences -> Bool [_prefTabUiReturnSelects] :: Preferences -> Bool [_prefObeyInlineImgLimit] :: Preferences -> Bool [_prefNewMsgSnd] :: Preferences -> Text [_prefRequireAt] :: Preferences -> Bool [_prefExpandNonMediaAttachments] :: Preferences -> Bool [_prefShowTyping] :: Preferences -> Bool [_prefPagekeysHandled] :: Preferences -> Bool [_prefLastSnippetType] :: Preferences -> Text [_prefDisplayRealNamesOverride] :: Preferences -> Int [_prefTime24] :: Preferences -> Bool [_prefEnterIsSpecialInTbt] :: Preferences -> Bool [_prefGraphicEmoticons] :: Preferences -> Bool [_prefConvertEmoticons] :: Preferences -> Bool [_prefAutoplayChatSounds] :: Preferences -> Bool [_prefSsEmojis] :: Preferences -> Bool [_prefSidebarBehavior] :: Preferences -> Text [_prefMarkMsgsReadImmediately] :: Preferences -> Bool [_prefStartScrollAtOldest] :: Preferences -> Bool [_prefSnippetEditorWrapLongLines] :: Preferences -> Bool [_prefLsDisabled] :: Preferences -> Bool [_prefSidebarTheme] :: Preferences -> Text [_prefSidebarThemeCustomValues] :: Preferences -> Text [_prefFKeySearch] :: Preferences -> Bool [_prefKKeyOmnibox] :: Preferences -> Bool [_prefSpeakGrowls] :: Preferences -> Bool [_prefMacSpeakVoice] :: Preferences -> Text [_prefMacSpeakSpeed] :: Preferences -> Int [_prefPushAtChannelSuppressedChannels] :: Preferences -> Text [_prefPromptedForEmailDisabling] :: Preferences -> Bool [_prefFullTextExtracts] :: Preferences -> Bool [_prefNoTextInNotifications] :: Preferences -> Bool [_prefMutedChannels] :: Preferences -> Text [_prefPrivacyPolicySeen] :: Preferences -> Bool [_prefSearchExcludeBots] :: Preferences -> Bool prefWelcomeMessageHidden :: Lens' Preferences Bool prefWebappSpellcheck :: Lens' Preferences Bool prefUserColors :: Lens' Preferences Text prefTimezone :: Lens' Preferences (Maybe Text) prefTime24 :: Lens' Preferences Bool prefTabUiReturnSelects :: Lens' Preferences Bool prefStartScrollAtOldest :: Lens' Preferences Bool prefSsEmojis :: Lens' Preferences Bool prefSpeakGrowls :: Lens' Preferences Bool prefSnippetEditorWrapLongLines :: Lens' Preferences Bool prefSidebarThemeCustomValues :: Lens' Preferences Text prefSidebarTheme :: Lens' Preferences Text prefSidebarBehavior :: Lens' Preferences Text prefShowTyping :: Lens' Preferences Bool prefShowMemberPresence :: Lens' Preferences Bool prefSeenWelcome2 :: Lens' Preferences Bool prefSeenSsbPrompt :: Lens' Preferences Bool prefSeenMemberInviteReminder :: Lens' Preferences Bool prefSeenDomainInviteReminder :: Lens' Preferences Bool prefSearchSort :: Lens' Preferences Text prefSearchOnlyMyChannels :: Lens' Preferences Bool prefSearchExcludeChannels :: Lens' Preferences Text prefSearchExcludeBots :: Lens' Preferences Bool prefRequireAt :: Lens' Preferences Bool prefPushSound :: Lens' Preferences Text prefPushMentionAlert :: Lens' Preferences Bool prefPushLoudChannelsSet :: Lens' Preferences Text prefPushLoudChannels :: Lens' Preferences Text prefPushIdleWait :: Lens' Preferences Int prefPushEverything :: Lens' Preferences Bool prefPushDmAlert :: Lens' Preferences Bool prefPushAtChannelSuppressedChannels :: Lens' Preferences Text prefPromptedForEmailDisabling :: Lens' Preferences Bool prefPrivacyPolicySeen :: Lens' Preferences Bool prefPostsFormattingGuide :: Lens' Preferences Bool prefPagekeysHandled :: Lens' Preferences Bool prefObeyInlineImgLimit :: Lens' Preferences Bool prefNoTextInNotifications :: Lens' Preferences Bool prefNoJoinedOverlays :: Lens' Preferences Bool prefNoCreatedOverlays :: Lens' Preferences Bool prefNewMsgSnd :: Lens' Preferences Text prefNeverChannels :: Lens' Preferences Text prefMutedChannels :: Lens' Preferences Text prefMuteSounds :: Lens' Preferences Bool prefMessagesTheme :: Lens' Preferences Text prefMarkMsgsReadImmediately :: Lens' Preferences Bool prefMacSpeakVoice :: Lens' Preferences Text prefMacSpeakSpeed :: Lens' Preferences Int prefLsDisabled :: Lens' Preferences Bool prefLoudChannelsSet :: Lens' Preferences Text prefLoudChannels :: Lens' Preferences Text prefLastSnippetType :: Lens' Preferences Text prefKKeyOmnibox :: Lens' Preferences Bool prefHighlightWords :: Lens' Preferences Text prefHasUploaded :: Lens' Preferences Bool prefHasInvited :: Lens' Preferences Bool prefHasCreatedChannel :: Lens' Preferences Bool prefGrowlsEnabled :: Lens' Preferences Bool prefGraphicEmoticons :: Lens' Preferences Bool prefFullTextExtracts :: Lens' Preferences Bool prefFKeySearch :: Lens' Preferences Bool prefExpandSnippets :: Lens' Preferences Bool prefExpandNonMediaAttachments :: Lens' Preferences Bool prefExpandInlineImgs :: Lens' Preferences Bool prefEnterIsSpecialInTbt :: Lens' Preferences Bool prefEmojiMode :: Lens' Preferences Text prefEmailWeekly :: Lens' Preferences Bool prefEmailMisc :: Lens' Preferences Bool prefEmailAlertsSleepUntil :: Lens' Preferences Int prefEmailAlerts :: Lens' Preferences Text prefDropboxEnabled :: Lens' Preferences Bool prefDisplayRealNamesOverride :: Lens' Preferences Int prefConvertEmoticons :: Lens' Preferences Bool prefColorNamesInList :: Lens' Preferences Bool prefAutoplayChatSounds :: Lens' Preferences Bool prefArrowHistory :: Lens' Preferences Bool prefAllChannelsLoud :: Lens' Preferences Bool instance Data.Aeson.Types.Class.ToJSON Web.Slack.Types.Preferences.Preferences instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Preferences.Preferences instance GHC.Show.Show Web.Slack.Types.Preferences.Preferences module Web.Slack.Types.Error data SlackError SlackError :: SlackError instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Error.SlackError instance GHC.Show.Show Web.Slack.Types.Error.SlackError module Web.Slack.Types.Time newtype Time Time :: POSIXTime -> Time [_getTime] :: Time -> POSIXTime data SlackTimeStamp SlackTimeStamp :: Time -> Int -> SlackTimeStamp [_slackTime] :: SlackTimeStamp -> Time [_timestampUid] :: SlackTimeStamp -> Int timestampUid :: Lens' SlackTimeStamp Int slackTime :: Lens' SlackTimeStamp Time getTime :: Iso' Time POSIXTime instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Time.SlackTimeStamp instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Time.Time instance GHC.Classes.Eq Web.Slack.Types.Time.SlackTimeStamp instance GHC.Classes.Ord Web.Slack.Types.Time.SlackTimeStamp instance GHC.Show.Show Web.Slack.Types.Time.SlackTimeStamp instance GHC.Show.Show Web.Slack.Types.Time.Time instance GHC.Classes.Ord Web.Slack.Types.Time.Time instance GHC.Classes.Eq Web.Slack.Types.Time.Time instance GHC.Real.Real Web.Slack.Types.Time.Time instance GHC.Num.Num Web.Slack.Types.Time.Time instance GHC.Real.Fractional Web.Slack.Types.Time.Time module Web.Slack.Types.Id type UserId = Id TUser type BotId = Id TBot type ChannelId = Id TChannel type FileId = Id TFile type CommentId = Id TComment type GroupId = Id TGroup type IMId = Id TIM type TeamId = Id TTeam data Id (a :: FieldType) getId :: Iso (Id a_a1Oks) (Id a_a1Ooi) Text Text instance GHC.Classes.Eq (Web.Slack.Types.Id.Id a) instance GHC.Show.Show (Web.Slack.Types.Id.Id a) instance GHC.Show.Show Web.Slack.Types.Id.FieldType instance GHC.Classes.Eq Web.Slack.Types.Id.FieldType instance Data.Aeson.Types.Class.ToJSON (Web.Slack.Types.Id.Id a) instance Data.Aeson.Types.Class.FromJSON (Web.Slack.Types.Id.Id a) module Web.Slack.Types.TeamPreferences data TeamPreferences TeamPreferences :: [ChannelId] -> Int -> Bool -> Bool -> Bool -> Text -> Text -> Text -> Text -> Text -> Text -> Text -> Text -> Int -> Int -> Int -> Int -> Int -> Int -> TeamPreferences [_teamDefaultChannels] :: TeamPreferences -> [ChannelId] [_teamMsgEditWindowMins] :: TeamPreferences -> Int [_teamAllowMessageDeletion] :: TeamPreferences -> Bool [_teamHideReferers] :: TeamPreferences -> Bool [_teamDisplayRealNames] :: TeamPreferences -> Bool [_teamWhoCanAtEveryone] :: TeamPreferences -> Text [_teamWhoCanAtChannel] :: TeamPreferences -> Text [_teamWhoCanCreateChannels] :: TeamPreferences -> Text [_teamWhoCanArchiveChannels] :: TeamPreferences -> Text [_teamWhoCanCreateGroups] :: TeamPreferences -> Text [_teamWhoCanPostGeneral] :: TeamPreferences -> Text [_teamWhoCanKickChannels] :: TeamPreferences -> Text [_teamWhoCanKickGroups] :: TeamPreferences -> Text [_teamRetentionType] :: TeamPreferences -> Int [_teamRetentionDuration] :: TeamPreferences -> Int [_teamGroupRetentionType] :: TeamPreferences -> Int [_teamGroupRetentionDuration] :: TeamPreferences -> Int [_teamDmRetentionType] :: TeamPreferences -> Int [_teamDmRetentionDuration] :: TeamPreferences -> Int teamWhoCanPostGeneral :: Lens' TeamPreferences Text teamWhoCanKickGroups :: Lens' TeamPreferences Text teamWhoCanKickChannels :: Lens' TeamPreferences Text teamWhoCanCreateGroups :: Lens' TeamPreferences Text teamWhoCanCreateChannels :: Lens' TeamPreferences Text teamWhoCanAtEveryone :: Lens' TeamPreferences Text teamWhoCanAtChannel :: Lens' TeamPreferences Text teamWhoCanArchiveChannels :: Lens' TeamPreferences Text teamRetentionType :: Lens' TeamPreferences Int teamRetentionDuration :: Lens' TeamPreferences Int teamMsgEditWindowMins :: Lens' TeamPreferences Int teamHideReferers :: Lens' TeamPreferences Bool teamGroupRetentionType :: Lens' TeamPreferences Int teamGroupRetentionDuration :: Lens' TeamPreferences Int teamDmRetentionType :: Lens' TeamPreferences Int teamDmRetentionDuration :: Lens' TeamPreferences Int teamDisplayRealNames :: Lens' TeamPreferences Bool teamDefaultChannels :: Lens' TeamPreferences [ChannelId] teamAllowMessageDeletion :: Lens' TeamPreferences Bool instance Data.Aeson.Types.Class.ToJSON Web.Slack.Types.TeamPreferences.TeamPreferences instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.TeamPreferences.TeamPreferences instance GHC.Show.Show Web.Slack.Types.TeamPreferences.TeamPreferences module Web.Slack.Types.Team data Team Team :: TeamId -> Text -> Text -> Text -> TeamPreferences -> TeamIcons -> Bool -> Team [_teamId] :: Team -> TeamId [_teamName] :: Team -> Text [_teamEmailDomain] :: Team -> Text [_teamDomain] :: Team -> Text [_teamPreferences] :: Team -> TeamPreferences [_teamIcons] :: Team -> TeamIcons [_teamOverStorageLimit] :: Team -> Bool data TeamIcons TeamIcons :: URL -> URL -> URL -> URL -> URL -> URL -> Maybe Bool -> TeamIcons [_teamIcon34] :: TeamIcons -> URL [_teamIcon44] :: TeamIcons -> URL [_teamIcon68] :: TeamIcons -> URL [_teamIcon88] :: TeamIcons -> URL [_teamIcon102] :: TeamIcons -> URL [_teamIcon132] :: TeamIcons -> URL [_teamIconDefault] :: TeamIcons -> Maybe Bool teamPreferences :: Lens' Team TeamPreferences teamOverStorageLimit :: Lens' Team Bool teamName :: Lens' Team Text teamId :: Lens' Team TeamId teamIcons :: Lens' Team TeamIcons teamEmailDomain :: Lens' Team Text teamDomain :: Lens' Team Text teamIconDefault :: Lens' TeamIcons (Maybe Bool) teamIcon88 :: Lens' TeamIcons URL teamIcon68 :: Lens' TeamIcons URL teamIcon44 :: Lens' TeamIcons URL teamIcon34 :: Lens' TeamIcons URL teamIcon132 :: Lens' TeamIcons URL teamIcon102 :: Lens' TeamIcons URL instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Team.Team instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Team.TeamIcons instance GHC.Show.Show Web.Slack.Types.Team.Team instance GHC.Show.Show Web.Slack.Types.Team.TeamIcons module Web.Slack.Types.Self data Self Self :: UserId -> Text -> Preferences -> Time -> Presence -> Self [_selfUserId] :: Self -> UserId [_selfName] :: Self -> Text [_selfPreferences] :: Self -> Preferences [_selfCreated] :: Self -> Time [_selfManualPresence] :: Self -> Presence selfUserId :: Lens' Self UserId selfPreferences :: Lens' Self Preferences selfName :: Lens' Self Text selfManualPresence :: Lens' Self Presence selfCreated :: Lens' Self Time instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Self.Self instance GHC.Show.Show Web.Slack.Types.Self.Self module Web.Slack.Types.User data User User :: UserId -> Text -> Bool -> Text -> Profile -> Permissions -> Bool -> Timezone -> User [_userId] :: User -> UserId [_userName] :: User -> Text [_userDeleted] :: User -> Bool [_userColor] :: User -> Text [_userProfile] :: User -> Profile [_userPermission] :: User -> Permissions [_userHasFiles] :: User -> Bool [_userTimezone] :: User -> Timezone defaultTimezone :: Timezone data Timezone Timezone :: Maybe Text -> Text -> Int -> Timezone [_timezoneDesc] :: Timezone -> Maybe Text [_timezoneLabel] :: Timezone -> Text [_timezoneOffset] :: Timezone -> Int data Permissions Permissions :: Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Permissions [_isAdmin] :: Permissions -> Bool [_isOwner] :: Permissions -> Bool [_isPrimaryOwner] :: Permissions -> Bool [_isRestricted] :: Permissions -> Bool [_isUltraRestricted] :: Permissions -> Bool [_isBot] :: Permissions -> Bool data Profile Profile :: Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> Maybe Text -> URL -> URL -> URL -> URL -> URL -> Profile [_profileFirstName] :: Profile -> Maybe Text [_profileLastName] :: Profile -> Maybe Text [_profileRealName] :: Profile -> Maybe Text [_profileRealNameNormalized] :: Profile -> Maybe Text [_profileTitle] :: Profile -> Maybe Text [_progileEmail] :: Profile -> Maybe Text [_profileSkype] :: Profile -> Maybe Text [_profilePhone] :: Profile -> Maybe Text [_profileImage24] :: Profile -> URL [_profileImage32] :: Profile -> URL [_profileImage48] :: Profile -> URL [_profileImage72] :: Profile -> URL [_profileImage192] :: Profile -> URL progileEmail :: Lens' Profile (Maybe Text) profileTitle :: Lens' Profile (Maybe Text) profileSkype :: Lens' Profile (Maybe Text) profileRealNameNormalized :: Lens' Profile (Maybe Text) profileRealName :: Lens' Profile (Maybe Text) profilePhone :: Lens' Profile (Maybe Text) profileLastName :: Lens' Profile (Maybe Text) profileImage72 :: Lens' Profile URL profileImage48 :: Lens' Profile URL profileImage32 :: Lens' Profile URL profileImage24 :: Lens' Profile URL profileImage192 :: Lens' Profile URL profileFirstName :: Lens' Profile (Maybe Text) isUltraRestricted :: Lens' Permissions Bool isRestricted :: Lens' Permissions Bool isPrimaryOwner :: Lens' Permissions Bool isOwner :: Lens' Permissions Bool isBot :: Lens' Permissions Bool isAdmin :: Lens' Permissions Bool timezoneOffset :: Lens' Timezone Int timezoneLabel :: Lens' Timezone Text timezoneDesc :: Lens' Timezone (Maybe Text) userTimezone :: Lens' User Timezone userProfile :: Lens' User Profile userPermission :: Lens' User Permissions userName :: Lens' User Text userId :: Lens' User UserId userHasFiles :: Lens' User Bool userDeleted :: Lens' User Bool userColor :: Lens' User Text type Username = Text instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.User.Profile instance GHC.Show.Show Web.Slack.Types.User.User instance GHC.Show.Show Web.Slack.Types.User.Profile instance GHC.Show.Show Web.Slack.Types.User.Permissions instance GHC.Show.Show Web.Slack.Types.User.Timezone instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.User.User instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.User.Permissions instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.User.Timezone module Web.Slack.Types.Topic type Purpose = Topic data Topic Topic :: Text -> Text -> Int -> Topic [_topicValue] :: Topic -> Text [_topicCreator] :: Topic -> Text [_topicLastSet] :: Topic -> Int topicValue :: Lens' Topic Text topicLastSet :: Lens' Topic Int topicCreator :: Lens' Topic Text instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Topic.Topic instance GHC.Show.Show Web.Slack.Types.Topic.Topic module Web.Slack.Types.Channel data Channel Channel :: ChannelId -> Text -> Time -> UserId -> Maybe Bool -> Bool -> Maybe [UserId] -> Maybe Topic -> Maybe Purpose -> Bool -> Maybe ChannelOpt -> Channel [_channelId] :: Channel -> ChannelId [_channelName] :: Channel -> Text [_channelCreated] :: Channel -> Time [_channelCreator] :: Channel -> UserId [_channelIsArchived] :: Channel -> Maybe Bool [_channelIsGeneral] :: Channel -> Bool [_channelMembers] :: Channel -> Maybe [UserId] [_channelTopic] :: Channel -> Maybe Topic [_channelPurpose] :: Channel -> Maybe Purpose [_channelIsMember] :: Channel -> Bool [_channelOpt] :: Channel -> Maybe ChannelOpt channelTopic :: Lens' Channel (Maybe Topic) channelPurpose :: Lens' Channel (Maybe Purpose) channelOpt :: Lens' Channel (Maybe ChannelOpt) channelName :: Lens' Channel Text channelMembers :: Lens' Channel (Maybe [UserId]) channelIsMember :: Lens' Channel Bool channelIsGeneral :: Lens' Channel Bool channelIsArchived :: Lens' Channel (Maybe Bool) channelId :: Lens' Channel ChannelId channelCreator :: Lens' Channel UserId channelCreated :: Lens' Channel Time defaultToFalse :: Object -> Text -> Parser Bool instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Channel.Channel instance GHC.Show.Show Web.Slack.Types.Channel.Channel module Web.Slack.Types.Group data Group Group :: GroupId -> Text -> Time -> UserId -> Bool -> Bool -> [UserId] -> Topic -> Purpose -> Maybe ChannelOpt -> Bool -> Group [_groupId] :: Group -> GroupId [_groupName] :: Group -> Text [_groupCreated] :: Group -> Time [_groupCreator] :: Group -> UserId [_groupIsArchived] :: Group -> Bool [_groupIsOpen] :: Group -> Bool [_groupMembers] :: Group -> [UserId] [_groupTopic] :: Group -> Topic [_groupPurpose] :: Group -> Purpose [_groupOpt] :: Group -> Maybe ChannelOpt [_groupIsGroup] :: Group -> Bool groupTopic :: Lens' Group Topic groupPurpose :: Lens' Group Purpose groupOpt :: Lens' Group (Maybe ChannelOpt) groupName :: Lens' Group Text groupMembers :: Lens' Group [UserId] groupIsOpen :: Lens' Group Bool groupIsGroup :: Lens' Group Bool groupIsArchived :: Lens' Group Bool groupId :: Lens' Group GroupId groupCreator :: Lens' Group UserId groupCreated :: Lens' Group Time instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Group.Group instance GHC.Show.Show Web.Slack.Types.Group.Group module Web.Slack.Types.IM data IM IM :: IMId -> UserId -> Time -> Bool -> Bool -> Maybe ChannelOpt -> IM [_imId] :: IM -> IMId [_imUser] :: IM -> UserId [_imCreated] :: IM -> Time [_imIsOpen] :: IM -> Bool [_imIsIm] :: IM -> Bool [_imOpt] :: IM -> Maybe ChannelOpt imUser :: Lens' IM UserId imOpt :: Lens' IM (Maybe ChannelOpt) imIsOpen :: Lens' IM Bool imIsIm :: Lens' IM Bool imId :: Lens' IM IMId imCreated :: Lens' IM Time instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.IM.IM instance GHC.Show.Show Web.Slack.Types.IM.IM module Web.Slack.Types.Comment data Comment Comment :: CommentId -> Time -> UserId -> Text -> Comment [_commentId] :: Comment -> CommentId [_commentTimestamp] :: Comment -> Time [_commentUser] :: Comment -> UserId [_commentComment] :: Comment -> Text commentUser :: Lens' Comment UserId commentTimestamp :: Lens' Comment Time commentId :: Lens' Comment CommentId commentComment :: Lens' Comment Text instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Comment.Comment instance GHC.Show.Show Web.Slack.Types.Comment.Comment module Web.Slack.Types.File data File File :: FileId -> Time -> Maybe Text -> Text -> Text -> Text -> Text -> UserId -> Mode -> Bool -> Bool -> Text -> Int -> FileUrl -> Thumbnail -> URL -> Maybe URL -> Maybe Preview -> Bool -> Bool -> [ChannelId] -> [ChannelId] -> Maybe Comment -> Int -> Int -> File [_fileId] :: File -> FileId [_fileTimestamp] :: File -> Time [_fileName] :: File -> Maybe Text [_fileTitle] :: File -> Text [_fileMime] :: File -> Text [_filetype] :: File -> Text [_filePrettyType] :: File -> Text [_fileUser] :: File -> UserId [_fileMode] :: File -> Mode [_fileEditable] :: File -> Bool [_fileIsExternal] :: File -> Bool [_fileExternalType] :: File -> Text [_fileSize] :: File -> Int [_fileUrl] :: File -> FileUrl [_fileThumbs] :: File -> Thumbnail [_filePermalink] :: File -> URL [_fileEditLink] :: File -> Maybe URL [_filePreview] :: File -> Maybe Preview [_filePublic] :: File -> Bool [_filePublicShared] :: File -> Bool [_fileChannels] :: File -> [ChannelId] [_fileGroups] :: File -> [ChannelId] [_fileInitialComment] :: File -> Maybe Comment [_fileStars] :: File -> Int [_fileComments] :: File -> Int data Mode Hosted :: Mode External :: Mode Snippet :: Mode Post :: Mode data Preview Preview :: Text -> Text -> Int -> Int -> Preview [_previewText] :: Preview -> Text [_previewHighlight] :: Preview -> Text [_lines] :: Preview -> Int [_linesMore] :: Preview -> Int data FileUrl URL :: Text -> Text -> FileUrl [_private] :: FileUrl -> Text [_privateDownload] :: FileUrl -> Text data Thumbnail Thumbnail :: Maybe URL -> Maybe URL -> Maybe URL -> Maybe URL -> Maybe Int -> Maybe Int -> Thumbnail [_w64] :: Thumbnail -> Maybe URL [_w80] :: Thumbnail -> Maybe URL [_w360] :: Thumbnail -> Maybe URL [_w360gif] :: Thumbnail -> Maybe URL [_width] :: Thumbnail -> Maybe Int [_height] :: Thumbnail -> Maybe Int filetype :: Lens' File Text fileUser :: Lens' File UserId fileUrl :: Lens' File FileUrl fileTitle :: Lens' File Text fileTimestamp :: Lens' File Time fileThumbs :: Lens' File Thumbnail fileStars :: Lens' File Int fileSize :: Lens' File Int filePublicShared :: Lens' File Bool filePublic :: Lens' File Bool filePreview :: Lens' File (Maybe Preview) filePrettyType :: Lens' File Text filePermalink :: Lens' File URL fileName :: Lens' File (Maybe Text) fileMode :: Lens' File Mode fileMime :: Lens' File Text fileIsExternal :: Lens' File Bool fileInitialComment :: Lens' File (Maybe Comment) fileId :: Lens' File FileId fileGroups :: Lens' File [ChannelId] fileExternalType :: Lens' File Text fileEditable :: Lens' File Bool fileEditLink :: Lens' File (Maybe URL) fileComments :: Lens' File Int fileChannels :: Lens' File [ChannelId] privateDownload :: Lens' FileUrl Text private :: Lens' FileUrl Text width :: Lens' Thumbnail (Maybe Int) w80 :: Lens' Thumbnail (Maybe URL) w64 :: Lens' Thumbnail (Maybe URL) w360gif :: Lens' Thumbnail (Maybe URL) w360 :: Lens' Thumbnail (Maybe URL) height :: Lens' Thumbnail (Maybe Int) previewText :: Lens' Preview Text previewHighlight :: Lens' Preview Text linesMore :: Lens' Preview Int lines :: Lens' Preview Int instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.File.Mode instance GHC.Show.Show Web.Slack.Types.File.File instance GHC.Show.Show Web.Slack.Types.File.Thumbnail instance GHC.Show.Show Web.Slack.Types.File.FileUrl instance GHC.Show.Show Web.Slack.Types.File.Preview instance GHC.Show.Show Web.Slack.Types.File.Mode instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.File.File instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.File.FileUrl instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.File.Thumbnail instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.File.Preview module Web.Slack.Types.Item data Item MessageItem :: ChannelId -> MessageUpdate -> Item FileItem :: File -> Item FileCommentItem :: File -> Comment -> Item ChannelItem :: ChannelId -> Item IMItem :: ChannelId -> Item GroupItem :: GroupId -> Item data MessageUpdate MessageUpdate :: UserId -> Text -> SlackTimeStamp -> Maybe Edited -> Maybe URL -> MessageUpdate [_messageUpdateUser] :: MessageUpdate -> UserId [_messageUpdateText] :: MessageUpdate -> Text [_messageUpdateTime] :: MessageUpdate -> SlackTimeStamp [_messageUpdateEdited] :: MessageUpdate -> Maybe Edited [_messagePermalink] :: MessageUpdate -> Maybe URL data Edited Edited :: UserId -> SlackTimeStamp -> Edited [_editedUser] :: Edited -> UserId [_editTimestap] :: Edited -> SlackTimeStamp messageUpdateUser :: Lens' MessageUpdate UserId messageUpdateTime :: Lens' MessageUpdate SlackTimeStamp messageUpdateText :: Lens' MessageUpdate Text messageUpdateEdited :: Lens' MessageUpdate (Maybe Edited) messagePermalink :: Lens' MessageUpdate (Maybe URL) editedUser :: Lens' Edited UserId editTimestap :: Lens' Edited SlackTimeStamp instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Item.Edited instance GHC.Show.Show Web.Slack.Types.Item.Item instance GHC.Show.Show Web.Slack.Types.Item.MessageUpdate instance GHC.Show.Show Web.Slack.Types.Item.Edited instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Item.Item instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Item.MessageUpdate module Web.Slack.Types.Bot data Bot Bot :: BotId -> Text -> Maybe BotIcons -> Bot [_botId] :: Bot -> BotId [_botName] :: Bot -> Text [_botIcons] :: Bot -> Maybe BotIcons data BotIcons BotIcons :: Maybe URL -> BotIcons [_botIconImage48] :: BotIcons -> Maybe URL botName :: Lens' Bot Text botId :: Lens' Bot BotId botIcons :: Lens' Bot (Maybe BotIcons) botIconImage48 :: Iso' BotIcons (Maybe URL) instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Bot.BotIcons instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Bot.Bot instance GHC.Show.Show Web.Slack.Types.Bot.Bot instance GHC.Show.Show Web.Slack.Types.Bot.BotIcons module Web.Slack.Types.Event.Subtype data Subtype SBotMessage :: BotId -> Maybe Username -> Maybe BotIcons -> Subtype SMeMessage :: Subtype SMessageChanged :: MessageUpdate -> Subtype SChannelJoin :: Maybe UserId -> Subtype SMessageDeleted :: SlackTimeStamp -> Subtype SChannelLeave :: Subtype SChannelTopic :: Text -> Subtype SChannelPurpose :: Text -> Subtype SChannelName :: Text -> Text -> Subtype SChannelArchive :: [UserId] -> Subtype SChannelUnarchive :: Subtype SGroupJoin :: Maybe UserId -> Subtype SGroupLeave :: Subtype SGroupTopic :: Text -> Subtype SGroupPurpose :: Text -> Subtype SGroupName :: Text -> Text -> Subtype SGroupArchive :: [UserId] -> Subtype SGroupUnarchive :: Subtype SFileShare :: File -> Bool -> Subtype SFileComment :: File -> Comment -> Subtype SFileMention :: File -> Subtype SPinnedItem :: Subtype SUnpinnedItem :: Subtype subtype :: String -> Value -> Parser Subtype instance GHC.Show.Show Web.Slack.Types.Event.Subtype.Subtype module Web.Slack.Types.Event type Domain = Text data Event Hello :: Event Message :: ChannelId -> Submitter -> Text -> SlackTimeStamp -> Maybe Subtype -> Maybe Edited -> Event HiddenMessage :: ChannelId -> Submitter -> SlackTimeStamp -> Maybe Subtype -> Event ChannelMarked :: ChannelId -> SlackTimeStamp -> Event ChannelCreated :: Channel -> Event ChannelJoined :: Channel -> Event ChannelLeft :: Channel -> Event ChannelDeleted :: ChannelId -> Event ChannelRename :: ChannelRenameInfo -> Event ChannelArchive :: ChannelId -> UserId -> Event ChannelUnarchive :: ChannelId -> UserId -> Event ChannelHistoryChanged :: SlackTimeStamp -> SlackTimeStamp -> SlackTimeStamp -> Event ImCreated :: UserId -> IM -> Event ImOpen :: UserId -> IMId -> Event ImClose :: UserId -> IMId -> Event ImMarked :: IMId -> SlackTimeStamp -> Event ImHistoryChanged :: SlackTimeStamp -> SlackTimeStamp -> SlackTimeStamp -> Event GroupJoined :: Group -> Event GroupLeft :: Group -> Event GroupOpen :: UserId -> GroupId -> Event GroupClose :: UserId -> GroupId -> Event GroupArchive :: GroupId -> Event GroupUnarchive :: GroupId -> Event GroupRename :: ChannelRenameInfo -> Event GroupMarked :: GroupId -> SlackTimeStamp -> Event GroupHistoryChanged :: SlackTimeStamp -> SlackTimeStamp -> SlackTimeStamp -> Event FileCreated :: File -> Event FileShared :: File -> Event FileUnshared :: File -> Event FilePublic :: File -> Event FilePrivate :: FileId -> Event FileChange :: File -> Event FileDeleted :: FileId -> SlackTimeStamp -> Event FileCommentAdded :: File -> Comment -> Event FileCommentEdited :: File -> Comment -> Event FileCommentDeleted :: File -> CommentId -> Event PresenceChange :: UserId -> Presence -> Event ManualPresenceChange :: Presence -> Event PrefChange :: Pref -> Event UserChange :: User -> Event TeamJoin :: User -> Event ReactionAdded :: UserId -> Maybe Text -> Item -> SlackTimeStamp -> Event ReactionRemoved :: UserId -> Maybe Text -> Item -> SlackTimeStamp -> Event StarAdded :: UserId -> Item -> SlackTimeStamp -> Event StarRemoved :: UserId -> Item -> SlackTimeStamp -> Event EmojiChanged :: SlackTimeStamp -> Event CommandsChanged :: SlackTimeStamp -> Event TeamPrefChange :: Pref -> Event TeamRenameEvent :: Text -> Event TeamDomainChange :: URL -> Domain -> Event EmailDomainChange :: Domain -> SlackTimeStamp -> Event BotChanged :: Bot -> Event BotAdded :: Bot -> Event AccountsChanged :: Event UserTyping :: ChannelId -> UserId -> Event MessageResponse :: Int -> SlackTimeStamp -> Text -> Event MessageError :: Int -> SlackError -> Event StatusChange :: UserId -> Text -> SlackTimeStamp -> Event Pong :: Time -> Event ReconnectUrl :: URL -> Event TeamMigrationStarted :: Event PinAdded :: Event PinRemoved :: Event NoEvent :: Event UnknownEvent :: Value -> Event type Pref = (Text, Value) parseType :: Value -> Text -> Parser Event data Submitter UserComment :: UserId -> Submitter BotComment :: BotId -> Submitter System :: Submitter data ChannelRenameInfo ChannelRenameInfo :: ChannelId -> Text -> Time -> ChannelRenameInfo [_channelRenameId] :: ChannelRenameInfo -> ChannelId [_channelRenameName] :: ChannelRenameInfo -> Text [_channelRenameCreated] :: ChannelRenameInfo -> Time channelRenameName :: Lens' ChannelRenameInfo Text channelRenameId :: Lens' ChannelRenameInfo ChannelId channelRenameCreated :: Lens' ChannelRenameInfo Time _UnknownEvent :: Prism' Event Value _NoEvent :: Prism' Event () _PinRemoved :: Prism' Event () _PinAdded :: Prism' Event () _TeamMigrationStarted :: Prism' Event () _ReconnectUrl :: Prism' Event URL _Pong :: Prism' Event Time _StatusChange :: Prism' Event (UserId, Text, SlackTimeStamp) _MessageError :: Prism' Event (Int, SlackError) _MessageResponse :: Prism' Event (Int, SlackTimeStamp, Text) _UserTyping :: Prism' Event (ChannelId, UserId) _AccountsChanged :: Prism' Event () _BotAdded :: Prism' Event Bot _BotChanged :: Prism' Event Bot _EmailDomainChange :: Prism' Event (Domain, SlackTimeStamp) _TeamDomainChange :: Prism' Event (URL, Domain) _TeamRenameEvent :: Prism' Event Text _TeamPrefChange :: Prism' Event Pref _CommandsChanged :: Prism' Event SlackTimeStamp _EmojiChanged :: Prism' Event SlackTimeStamp _StarRemoved :: Prism' Event (UserId, Item, SlackTimeStamp) _StarAdded :: Prism' Event (UserId, Item, SlackTimeStamp) _ReactionRemoved :: Prism' Event (UserId, Maybe Text, Item, SlackTimeStamp) _ReactionAdded :: Prism' Event (UserId, Maybe Text, Item, SlackTimeStamp) _TeamJoin :: Prism' Event User _UserChange :: Prism' Event User _PrefChange :: Prism' Event Pref _ManualPresenceChange :: Prism' Event Presence _PresenceChange :: Prism' Event (UserId, Presence) _FileCommentDeleted :: Prism' Event (File, CommentId) _FileCommentEdited :: Prism' Event (File, Comment) _FileCommentAdded :: Prism' Event (File, Comment) _FileDeleted :: Prism' Event (FileId, SlackTimeStamp) _FileChange :: Prism' Event File _FilePrivate :: Prism' Event FileId _FilePublic :: Prism' Event File _FileUnshared :: Prism' Event File _FileShared :: Prism' Event File _FileCreated :: Prism' Event File _GroupHistoryChanged :: Prism' Event (SlackTimeStamp, SlackTimeStamp, SlackTimeStamp) _GroupMarked :: Prism' Event (GroupId, SlackTimeStamp) _GroupRename :: Prism' Event ChannelRenameInfo _GroupUnarchive :: Prism' Event GroupId _GroupArchive :: Prism' Event GroupId _GroupClose :: Prism' Event (UserId, GroupId) _GroupOpen :: Prism' Event (UserId, GroupId) _GroupLeft :: Prism' Event Group _GroupJoined :: Prism' Event Group _ImHistoryChanged :: Prism' Event (SlackTimeStamp, SlackTimeStamp, SlackTimeStamp) _ImMarked :: Prism' Event (IMId, SlackTimeStamp) _ImClose :: Prism' Event (UserId, IMId) _ImOpen :: Prism' Event (UserId, IMId) _ImCreated :: Prism' Event (UserId, IM) _ChannelHistoryChanged :: Prism' Event (SlackTimeStamp, SlackTimeStamp, SlackTimeStamp) _ChannelUnarchive :: Prism' Event (ChannelId, UserId) _ChannelArchive :: Prism' Event (ChannelId, UserId) _ChannelRename :: Prism' Event ChannelRenameInfo _ChannelDeleted :: Prism' Event ChannelId _ChannelLeft :: Prism' Event Channel _ChannelJoined :: Prism' Event Channel _ChannelCreated :: Prism' Event Channel _ChannelMarked :: Prism' Event (ChannelId, SlackTimeStamp) _HiddenMessage :: Prism' Event (ChannelId, Submitter, SlackTimeStamp, Maybe Subtype) _Message :: Prism' Event (ChannelId, Submitter, Text, SlackTimeStamp, Maybe Subtype, Maybe Edited) _Hello :: Prism' Event () instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Event.ChannelRenameInfo instance GHC.Show.Show Web.Slack.Types.Event.Event instance GHC.Show.Show Web.Slack.Types.Event.ChannelRenameInfo instance GHC.Classes.Eq Web.Slack.Types.Event.Submitter instance GHC.Show.Show Web.Slack.Types.Event.Submitter instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Event.Event module Web.Slack.Types.ChannelOpt data ChannelOpt ChannelOpt :: SlackTimeStamp -> Int -> Event -> ChannelOpt [_channelOptLastRead] :: ChannelOpt -> SlackTimeStamp [_channelOptUnreadCount] :: ChannelOpt -> Int [_channelOptLatest] :: ChannelOpt -> Event channelOptUnreadCount :: Lens' ChannelOpt Int channelOptLatest :: Lens' ChannelOpt Event channelOptLastRead :: Lens' ChannelOpt SlackTimeStamp instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.ChannelOpt.ChannelOpt instance GHC.Show.Show Web.Slack.Types.ChannelOpt.ChannelOpt module Web.Slack.Types.Session data SlackSession SlackSession :: Self -> Team -> [User] -> SlackTimeStamp -> [Channel] -> [Group] -> [IM] -> [Bot] -> Text -> SlackSession [_slackSelf] :: SlackSession -> Self [_slackTeam] :: SlackSession -> Team [_slackUsers] :: SlackSession -> [User] [_slackLatestEventTs] :: SlackSession -> SlackTimeStamp [_slackChannels] :: SlackSession -> [Channel] [_slackGroups] :: SlackSession -> [Group] [_slackIms] :: SlackSession -> [IM] [_slackBots] :: SlackSession -> [Bot] [_slackCacheVersion] :: SlackSession -> Text slackUsers :: Lens' SlackSession [User] slackTeam :: Lens' SlackSession Team slackSelf :: Lens' SlackSession Self slackLatestEventTs :: Lens' SlackSession SlackTimeStamp slackIms :: Lens' SlackSession [IM] slackGroups :: Lens' SlackSession [Group] slackChannels :: Lens' SlackSession [Channel] slackCacheVersion :: Lens' SlackSession Text slackBots :: Lens' SlackSession [Bot] instance GHC.Show.Show Web.Slack.Types.Session.SlackSession instance Data.Aeson.Types.Class.FromJSON Web.Slack.Types.Session.SlackSession module Web.Slack.Config -- | Configuration options needed to connect to the Slack API data SlackConfig SlackConfig :: String -> SlackConfig -- | API Token for Bot [_slackApiToken] :: SlackConfig -> String slackApiToken :: Iso' SlackConfig String instance GHC.Show.Show Web.Slack.Config.SlackConfig module Web.Slack.Types module Web.Slack.State newtype Slack s a Slack :: StateT (SlackState s) IO a -> Slack s a [runSlack] :: Slack s a -> StateT (SlackState s) IO a type SlackBot s = Event -> Slack s () data Metainfo Meta :: Connection -> Int -> Metainfo -- | Websockets connection [_metaConnection] :: Metainfo -> Connection -- | Unique message counter [_msgCounter] :: Metainfo -> Int data SlackState s SlackState :: Metainfo -> SlackSession -> s -> SlackConfig -> SlackState s -- | Information about the connection [_meta] :: SlackState s -> Metainfo -- | Information about the session at the start of the connection [_session] :: SlackState s -> SlackSession -- | User defined state [_userState] :: SlackState s -> s -- | A copy of the initial configuration [_config] :: SlackState s -> SlackConfig userState :: Lens (SlackState s_a5YIW) (SlackState s_a5ZRo) s_a5YIW s_a5ZRo session :: Lens' (SlackState s_a5YIW) SlackSession meta :: Lens' (SlackState s_a5YIW) Metainfo config :: Lens' (SlackState s_a5YIW) SlackConfig msgCounter :: Lens' Metainfo Int metaConnection :: Lens' Metainfo Connection slackLog :: Show a => a -> MonadIO m => m () counter :: Slack s Int connection :: Lens' (SlackState s) Connection instance Control.Monad.IO.Class.MonadIO (Web.Slack.State.Slack s) instance Control.Monad.State.Class.MonadState (Web.Slack.State.SlackState s) (Web.Slack.State.Slack s) instance GHC.Base.Applicative (Web.Slack.State.Slack s) instance GHC.Base.Functor (Web.Slack.State.Slack s) instance GHC.Base.Monad (Web.Slack.State.Slack s) instance GHC.Show.Show s => GHC.Show.Show (Web.Slack.State.SlackState s) instance GHC.Show.Show Web.Slack.State.Metainfo module Web.Slack.Message -- | Send a message to the specified channel. -- -- If the message is longer than 4000 bytes then the connection will be -- closed. sendMessage :: ChannelId -> Text -> Slack s () makePingPacket :: Slack s (IO ()) -- | Send a ping packet to the server The server will respond with a -- pong Event. ping :: Connection -> PingPayload -> IO () instance Data.Aeson.Types.Class.ToJSON Web.Slack.Message.PingPayload instance GHC.Show.Show Web.Slack.Message.PingPayload instance Data.Aeson.Types.Class.ToJSON Web.Slack.Message.MessagePayload instance GHC.Show.Show Web.Slack.Message.MessagePayload -- | This module exposes functionality to write bots which responds to -- Events sent by the RTM API. By using the user state parameter -- s complicated interactions can be established. -- -- This basic example echos every message the bot recieves. Other -- examples can be found in the examples directory. -- --
--   myConfig :: SlackConfig
--   myConfig = SlackConfig
--           { _slackApiToken = "..." -- Specify your API token here
--           }
--   
--   -- type SlackBot s = Event -> Slack s ()
--   echoBot :: SlackBot ()
--   echoBot (Message cid _ msg _ _ _) = sendMessage cid msg
--   echoBot _ = return ()
--   
--   main :: IO ()
--   main = runBot myConfig echoBot ()
--   
module Web.Slack -- | Run a SlackBot. The supplied bot will respond to all events -- sent by the Slack RTM API. -- -- Be warned that this function will throw an IOError if the -- connection to the Slack API fails. runBot :: SlackConfig -> SlackBot s -> s -> IO () newtype Slack s a Slack :: StateT (SlackState s) IO a -> Slack s a [runSlack] :: Slack s a -> StateT (SlackState s) IO a type SlackBot s = Event -> Slack s () data SlackState s SlackState :: Metainfo -> SlackSession -> s -> SlackConfig -> SlackState s -- | Information about the connection [_meta] :: SlackState s -> Metainfo -- | Information about the session at the start of the connection [_session] :: SlackState s -> SlackSession -- | User defined state [_userState] :: SlackState s -> s -- | A copy of the initial configuration [_config] :: SlackState s -> SlackConfig userState :: Lens (SlackState s_a5YIW) (SlackState s_a5ZRo) s_a5YIW s_a5ZRo session :: Lens' (SlackState s_a5YIW) SlackSession