calamity-0.1.9.3: A library for writing discord bots
Safe HaskellNone
LanguageHaskell2010

Calamity.HTTP.Channel

Description

Channel endpoints

Documentation

data ChannelRequest a where Source #

Constructors

CreateMessage :: HasID Channel c => c -> CreateMessageOptions -> ChannelRequest Message 
GetMessage :: (HasID Channel c, HasID Message m) => c -> m -> ChannelRequest Message 
EditMessage :: (HasID Channel c, HasID Message m) => c -> m -> Maybe Text -> Maybe Embed -> 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 ChannelMessagesQuery -> 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 #

Methods

route :: ChannelRequest a -> Route Source #

action :: ChannelRequest a -> Options -> String -> IO (Response ByteString) Source #

invoke :: forall (r :: [(Type -> Type) -> Type -> Type]). (BotC r, FromJSON (Result (ChannelRequest a))) => ChannelRequest a -> Sem r (Either RestError (Result (ChannelRequest a))) Source #

type Result (ChannelRequest a) Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Result (ChannelRequest a) = a

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

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

Methods

toJSON :: ChannelUpdate -> Value

toEncoding :: ChannelUpdate -> Encoding

toJSONList :: [ChannelUpdate] -> Value

toEncodingList :: [ChannelUpdate] -> Encoding

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

Instances

Instances details
Show ChannelMessagesQuery Source # 
Instance details

Defined in Calamity.HTTP.Channel

Generic ChannelMessagesQuery Source # 
Instance details

Defined in Calamity.HTTP.Channel

Associated Types

type Rep ChannelMessagesQuery :: Type -> Type #

ToJSON ChannelMessagesQuery Source # 
Instance details

Defined in Calamity.HTTP.Channel

type Rep ChannelMessagesQuery Source # 
Instance details

Defined in Calamity.HTTP.Channel

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

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.1.9.3-inplace" 'False) (C1 ('MetaCons "CreateChannelInviteOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "maxAge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "maxUses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int))) :*: (S1 ('MetaSel ('Just "temporary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "unique") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))

data GroupDMAddRecipientOptions Source #