Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Channel endpoints
Synopsis
- data ChannelRequest a where
- CreateMessage :: HasID Channel c => c -> CreateMessageOptions -> ChannelRequest Message
- CrosspostMessage :: (HasID Channel c, HasID Message m) => c -> m -> ChannelRequest Message
- GetMessage :: (HasID Channel c, HasID Message m) => c -> m -> ChannelRequest Message
- EditMessage :: (HasID Channel c, HasID Message m) => c -> m -> EditMessageData -> ChannelRequest Message
- DeleteMessage :: (HasID Channel c, HasID Message m) => c -> m -> ChannelRequest ()
- BulkDeleteMessages :: (HasID Channel c, HasID Message m) => c -> [m] -> ChannelRequest ()
- GetChannel :: HasID Channel c => c -> ChannelRequest Channel
- ModifyChannel :: HasID Channel c => c -> ChannelUpdate -> ChannelRequest Channel
- DeleteChannel :: HasID Channel c => c -> ChannelRequest ()
- GetChannelMessages :: HasID Channel c => c -> Maybe ChannelMessagesFilter -> Maybe ChannelMessagesLimit -> ChannelRequest [Message]
- CreateReaction :: (HasID Channel c, HasID Message m) => c -> m -> RawEmoji -> ChannelRequest ()
- DeleteOwnReaction :: (HasID Channel c, HasID Message m) => c -> m -> RawEmoji -> ChannelRequest ()
- DeleteUserReaction :: (HasID Channel c, HasID Message m, HasID User u) => c -> m -> RawEmoji -> u -> ChannelRequest ()
- GetReactions :: (HasID Channel c, HasID Message m) => c -> m -> RawEmoji -> GetReactionsOptions -> ChannelRequest [User]
- DeleteAllReactions :: (HasID Channel c, HasID Message m) => c -> m -> ChannelRequest ()
- GetChannelInvites :: HasID Channel c => c -> ChannelRequest [Invite]
- CreateChannelInvite :: HasID Channel c => c -> CreateChannelInviteOptions -> ChannelRequest Invite
- EditChannelPermissions :: HasID Channel c => c -> Overwrite -> ChannelRequest ()
- DeleteChannelPermission :: (HasID Channel c, HasID Overwrite o) => c -> o -> ChannelRequest ()
- TriggerTyping :: HasID Channel c => c -> ChannelRequest ()
- GetPinnedMessages :: HasID Channel c => c -> ChannelRequest [Message]
- AddPinnedMessage :: (HasID Channel c, HasID Message m) => c -> m -> ChannelRequest ()
- DeletePinnedMessage :: (HasID Channel c, HasID Message m) => c -> m -> ChannelRequest ()
- GroupDMAddRecipient :: (HasID Channel c, HasID User u) => c -> u -> GroupDMAddRecipientOptions -> ChannelRequest ()
- GroupDMRemoveRecipient :: (HasID Channel c, HasID User u) => c -> u -> ChannelRequest ()
- data CreateMessageAttachment = CreateMessageAttachment {
- filename :: Text
- description :: Maybe Text
- content :: ByteString
- data CreateMessageOptions = CreateMessageOptions {}
- newtype EditMessageData = EditMessageData Object
- editMessageContent :: Maybe Text -> EditMessageData
- editMessageEmbeds :: [Embed] -> EditMessageData
- editMessageFlags :: Maybe Word64 -> EditMessageData
- editMessageAllowedMentions :: Maybe AllowedMentions -> EditMessageData
- editMessageComponents :: [Component] -> EditMessageData
- data ChannelUpdate = ChannelUpdate {}
- data AllowedMentionType
- data AllowedMentions = AllowedMentions {
- parse :: [AllowedMentionType]
- roles :: [Snowflake Role]
- users :: [Snowflake User]
- repliedUser :: Bool
- data ChannelMessagesFilter
- = ChannelMessagesAround { }
- | ChannelMessagesBefore { }
- | ChannelMessagesAfter { }
- newtype ChannelMessagesLimit = ChannelMessagesLimit {}
- data GetReactionsOptions = GetReactionsOptions {}
- data CreateChannelInviteOptions = CreateChannelInviteOptions {}
- data GroupDMAddRecipientOptions = GroupDMAddRecipientOptions {
- accessToken :: Text
- nick :: Text
Documentation
data ChannelRequest a where Source #
Instances
Request (ChannelRequest a) Source # | |
Defined in Calamity.HTTP.Channel type Result (ChannelRequest a) Source # route :: ChannelRequest a -> Route Source # action :: ChannelRequest a -> Url 'Https -> Option 'Https -> Req LbsResponse Source # modifyResponse :: ChannelRequest a -> Value -> Value Source # | |
type Result (ChannelRequest a) Source # | |
Defined in Calamity.HTTP.Channel |
data CreateMessageAttachment Source #
Instances
Show CreateMessageAttachment Source # | |
Defined in Calamity.HTTP.Channel showsPrec :: Int -> CreateMessageAttachment -> ShowS # show :: CreateMessageAttachment -> String # showList :: [CreateMessageAttachment] -> ShowS # | |
ToMessage CreateMessageAttachment Source # | Message attachments, |
Defined in Calamity.Types.Tellable | |
(k ~ A_Lens, a ~ ByteString, b ~ ByteString) => LabelOptic "content" k CreateMessageAttachment CreateMessageAttachment a b Source # | |
Defined in Calamity.HTTP.Channel | |
(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "description" k CreateMessageAttachment CreateMessageAttachment a b Source # | |
Defined in Calamity.HTTP.Channel | |
(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "filename" k CreateMessageAttachment CreateMessageAttachment a b Source # | |
Defined in Calamity.HTTP.Channel |
data CreateMessageOptions Source #
CreateMessageOptions | |
|
Instances
newtype EditMessageData Source #
Parameters to the Edit Message endpoint.
Use the provided methods (editMessageX
) to create a value with the
field set, use the Semigroup instance to union the values.
Examples
>>>
encode $ editMessageContent (Just "test") <> editMessageFlags Nothing
"{\"nick\":\"test\",\"deaf\":null}"
Instances
ToJSON EditMessageData Source # | |
Defined in Calamity.HTTP.Channel toJSON :: EditMessageData -> Value # toEncoding :: EditMessageData -> Encoding # toJSONList :: [EditMessageData] -> Value # toEncodingList :: [EditMessageData] -> Encoding # | |
Monoid EditMessageData Source # | |
Defined in Calamity.HTTP.Channel mappend :: EditMessageData -> EditMessageData -> EditMessageData # mconcat :: [EditMessageData] -> EditMessageData # | |
Semigroup EditMessageData Source # | |
Defined in Calamity.HTTP.Channel (<>) :: EditMessageData -> EditMessageData -> EditMessageData # sconcat :: NonEmpty EditMessageData -> EditMessageData # stimes :: Integral b => b -> EditMessageData -> EditMessageData # | |
Show EditMessageData Source # | |
Defined in Calamity.HTTP.Channel showsPrec :: Int -> EditMessageData -> ShowS # show :: EditMessageData -> String # showList :: [EditMessageData] -> ShowS # |
editMessageEmbeds :: [Embed] -> EditMessageData Source #
data ChannelUpdate Source #
Instances
data AllowedMentionType Source #
Instances
ToJSON AllowedMentionType Source # | |
Defined in Calamity.HTTP.Channel toJSON :: AllowedMentionType -> Value # toEncoding :: AllowedMentionType -> Encoding # toJSONList :: [AllowedMentionType] -> Value # toEncodingList :: [AllowedMentionType] -> Encoding # | |
Show AllowedMentionType Source # | |
Defined in Calamity.HTTP.Channel showsPrec :: Int -> AllowedMentionType -> ShowS # show :: AllowedMentionType -> String # showList :: [AllowedMentionType] -> ShowS # |
data AllowedMentions Source #
AllowedMentions | |
|
Instances
data ChannelMessagesFilter Source #
Instances
newtype ChannelMessagesLimit Source #
Instances
Show ChannelMessagesLimit Source # | |
Defined in Calamity.HTTP.Channel showsPrec :: Int -> ChannelMessagesLimit -> ShowS # show :: ChannelMessagesLimit -> String # showList :: [ChannelMessagesLimit] -> ShowS # | |
(k ~ An_Iso, a ~ Integer, b ~ Integer) => LabelOptic "limit" k ChannelMessagesLimit ChannelMessagesLimit a b Source # | |
Defined in Calamity.HTTP.Channel |
data GetReactionsOptions Source #
Instances
Show GetReactionsOptions Source # | |
Defined in Calamity.HTTP.Channel showsPrec :: Int -> GetReactionsOptions -> ShowS # show :: GetReactionsOptions -> String # showList :: [GetReactionsOptions] -> ShowS # | |
Default GetReactionsOptions Source # | |
Defined in Calamity.HTTP.Channel | |
(k ~ A_Lens, a ~ Maybe (Snowflake User), b ~ Maybe (Snowflake User)) => LabelOptic "after" k GetReactionsOptions GetReactionsOptions a b Source # | |
Defined in Calamity.HTTP.Channel | |
(k ~ A_Lens, a ~ Maybe (Snowflake User), b ~ Maybe (Snowflake User)) => LabelOptic "before" k GetReactionsOptions GetReactionsOptions a b Source # | |
Defined in Calamity.HTTP.Channel | |
(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "limit" k GetReactionsOptions GetReactionsOptions a b Source # | |
Defined in Calamity.HTTP.Channel |
data CreateChannelInviteOptions Source #
Instances
data GroupDMAddRecipientOptions Source #
Instances
ToJSON GroupDMAddRecipientOptions Source # | |
Defined in Calamity.HTTP.Channel | |
Show GroupDMAddRecipientOptions Source # | |
Defined in Calamity.HTTP.Channel showsPrec :: Int -> GroupDMAddRecipientOptions -> ShowS # show :: GroupDMAddRecipientOptions -> String # showList :: [GroupDMAddRecipientOptions] -> ShowS # | |
CalamityToJSON' GroupDMAddRecipientOptions Source # | |
Defined in Calamity.HTTP.Channel | |
(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "accessToken" k GroupDMAddRecipientOptions GroupDMAddRecipientOptions a b Source # | |
Defined in Calamity.HTTP.Channel | |
(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "nick" k GroupDMAddRecipientOptions GroupDMAddRecipientOptions a b Source # | |
Defined in Calamity.HTTP.Channel |