calamity-0.3.0.0: A library for writing discord bots in haskell
Safe HaskellNone
LanguageHaskell2010

Calamity.HTTP.Channel

Description

Channel endpoints

Synopsis

Documentation

data ChannelRequest a where Source #

Constructors

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 () 

Instances

Instances details
Request (ChannelRequest a) Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Result (ChannelRequest a) Source #

type Result (ChannelRequest a) Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Result (ChannelRequest a) = a

data CreateMessageAttachment Source #

data CreateMessageOptions Source #

Instances

Instances details
Show CreateMessageOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic CreateMessageOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep CreateMessageOptions :: Type -> Type #

Default CreateMessageOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

ToMessage CreateMessageOptions Source # 
Instance details

Defined in Calamity.Types.Tellable

ToMessage (Endo CreateMessageOptions) Source # 
Instance details

Defined in Calamity.Types.Tellable

ToMessage (CreateMessageOptions -> CreateMessageOptions) Source # 
Instance details

Defined in Calamity.Types.Tellable

type Rep CreateMessageOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

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}"

Constructors

EditMessageData Object 

Instances

Instances details
Show EditMessageData Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic EditMessageData Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep EditMessageData :: Type -> Type #

Semigroup EditMessageData Source # 
Instance details

Defined in Calamity.HTTP.Channel

Monoid EditMessageData Source # 
Instance details

Defined in Calamity.HTTP.Channel

ToJSON EditMessageData Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep EditMessageData Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep EditMessageData = D1 ('MetaData "EditMessageData" "Calamity.HTTP.Channel" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "EditMessageData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Object)))

data ChannelUpdate Source #

Instances

Instances details
Show ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep ChannelUpdate :: Type -> Type #

ToJSON ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

Default ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

Methods

def :: ChannelUpdate #

type Rep ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

data AllowedMentionType Source #

Instances

Instances details
Show AllowedMentionType Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic AllowedMentionType Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep AllowedMentionType :: Type -> Type #

ToJSON AllowedMentionType Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep AllowedMentionType Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep AllowedMentionType = D1 ('MetaData "AllowedMentionType" "Calamity.HTTP.Channel" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "AllowedMentionRoles" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AllowedMentionUsers" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AllowedMentionEveryone" 'PrefixI 'False) (U1 :: Type -> Type)))

data AllowedMentions Source #

Instances

Instances details
Show AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep AllowedMentions :: Type -> Type #

Semigroup AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Monoid AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

ToJSON AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Default AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

ToMessage AllowedMentions Source #

Allowed mentions, (<>) combines allowed mentions

Instance details

Defined in Calamity.Types.Tellable

type Rep AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

data ChannelMessagesFilter Source #

Instances

Instances details
Show ChannelMessagesFilter Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic ChannelMessagesFilter Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep ChannelMessagesFilter :: Type -> Type #

ToJSON ChannelMessagesFilter Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep ChannelMessagesFilter Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep ChannelMessagesFilter = D1 ('MetaData "ChannelMessagesFilter" "Calamity.HTTP.Channel" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "ChannelMessagesAround" 'PrefixI 'True) (S1 ('MetaSel ('Just "around") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Snowflake Message))) :+: (C1 ('MetaCons "ChannelMessagesBefore" 'PrefixI 'True) (S1 ('MetaSel ('Just "before") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Snowflake Message))) :+: C1 ('MetaCons "ChannelMessagesAfter" 'PrefixI 'True) (S1 ('MetaSel ('Just "after") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Snowflake Message)))))

newtype ChannelMessagesLimit Source #

Constructors

ChannelMessagesLimit 

Fields

Instances

Instances details
Show ChannelMessagesLimit Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic ChannelMessagesLimit Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep ChannelMessagesLimit :: Type -> Type #

type Rep ChannelMessagesLimit Source # 
Instance details

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 CreateChannelInviteOptions Source #

Instances

Instances details
Show CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep CreateChannelInviteOptions :: Type -> Type #

ToJSON CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Default CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep CreateChannelInviteOptions = D1 ('MetaData "CreateChannelInviteOptions" "Calamity.HTTP.Channel" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "CreateChannelInviteOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "maxAge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "maxUses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "temporary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "unique") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))))

data GroupDMAddRecipientOptions Source #