Safe Haskell | None |
---|---|
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
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
editMessageEmbeds :: [Embed] -> EditMessageData Source #
data ChannelUpdate Source #
Instances
data AllowedMentionType Source #
Instances
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 # | |
Generic ChannelMessagesLimit Source # | |
Defined in Calamity.HTTP.Channel type Rep ChannelMessagesLimit :: Type -> Type # from :: ChannelMessagesLimit -> Rep ChannelMessagesLimit x # to :: Rep ChannelMessagesLimit x -> ChannelMessagesLimit # | |
type Rep ChannelMessagesLimit Source # | |
Defined in Calamity.HTTP.Channel type Rep ChannelMessagesLimit = D1 ('MetaData "ChannelMessagesLimit" "Calamity.HTTP.Channel" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "ChannelMessagesLimit" 'PrefixI 'True) (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))) |
data GetReactionsOptions Source #
Instances
data CreateChannelInviteOptions Source #
Instances
data GroupDMAddRecipientOptions Source #
Instances
Show GroupDMAddRecipientOptions Source # | |
Defined in Calamity.HTTP.Channel showsPrec :: Int -> GroupDMAddRecipientOptions -> ShowS # show :: GroupDMAddRecipientOptions -> String # showList :: [GroupDMAddRecipientOptions] -> ShowS # | |
Generic GroupDMAddRecipientOptions Source # | |
Defined in Calamity.HTTP.Channel type Rep GroupDMAddRecipientOptions :: Type -> Type # | |
ToJSON GroupDMAddRecipientOptions Source # | |
Defined in Calamity.HTTP.Channel | |
type Rep GroupDMAddRecipientOptions Source # | |
Defined in Calamity.HTTP.Channel type Rep GroupDMAddRecipientOptions = D1 ('MetaData "GroupDMAddRecipientOptions" "Calamity.HTTP.Channel" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "GroupDMAddRecipientOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "accessToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "nick") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) |