calamity-0.8.0.0: A library for writing discord bots in haskell
Safe HaskellSafe-Inferred
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 CreateMessageOptions Source #

Instances

Instances details
Show CreateMessageOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

ToMessage CreateMessageOptions Source # 
Instance details

Defined in Calamity.Types.Tellable

Default CreateMessageOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe AllowedMentions, b ~ Maybe AllowedMentions) => LabelOptic "allowedMentions" k CreateMessageOptions CreateMessageOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe [CreateMessageAttachment], b ~ Maybe [CreateMessageAttachment]) => LabelOptic "attachments" k CreateMessageOptions CreateMessageOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe [Component], b ~ Maybe [Component]) => LabelOptic "components" k CreateMessageOptions CreateMessageOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "content" k CreateMessageOptions CreateMessageOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe [Embed], b ~ Maybe [Embed]) => LabelOptic "embeds" k CreateMessageOptions CreateMessageOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe MessageReference, b ~ Maybe MessageReference) => LabelOptic "messageReference" k CreateMessageOptions CreateMessageOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "nonce" k CreateMessageOptions CreateMessageOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Bool, b ~ Maybe Bool) => LabelOptic "tts" k CreateMessageOptions CreateMessageOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

ToMessage (Endo CreateMessageOptions) Source # 
Instance details

Defined in Calamity.Types.Tellable

ToMessage (CreateMessageOptions -> CreateMessageOptions) Source # 
Instance details

Defined in Calamity.Types.Tellable

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 

data ChannelUpdate Source #

Instances

Instances details
ToJSON ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

Show ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

CalamityToJSON' ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

Methods

toPairs :: KeyValue kv => ChannelUpdate -> [Maybe kv] Source #

Default ChannelUpdate Source # 
Instance details

Defined in Calamity.HTTP.Channel

Methods

def :: ChannelUpdate #

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "bitrate" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "name" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Bool, b ~ Maybe Bool) => LabelOptic "nsfw" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe (Snowflake Channel), b ~ Maybe (Snowflake Channel)) => LabelOptic "parentID" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe [Overwrite], b ~ Maybe [Overwrite]) => LabelOptic "permissionOverwrites" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "position" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "rateLimitPerUser" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "topic" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "userLimit" k ChannelUpdate ChannelUpdate a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

data AllowedMentions Source #

Instances

Instances details
ToJSON AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Monoid AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Semigroup AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Show AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

CalamityToJSON' AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Methods

toPairs :: KeyValue kv => AllowedMentions -> [Maybe kv] Source #

ToMessage AllowedMentions Source #

Allowed mentions, (<>) combines allowed mentions

Instance details

Defined in Calamity.Types.Tellable

Default AllowedMentions Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ [AllowedMentionType], b ~ [AllowedMentionType]) => LabelOptic "parse" k AllowedMentions AllowedMentions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Bool, b ~ Bool) => LabelOptic "repliedUser" k AllowedMentions AllowedMentions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ [Snowflake Role], b ~ [Snowflake Role]) => LabelOptic "roles" k AllowedMentions AllowedMentions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ [Snowflake User], b ~ [Snowflake User]) => LabelOptic "users" k AllowedMentions AllowedMentions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

data ChannelMessagesFilter Source #

Instances

Instances details
ToJSON ChannelMessagesFilter Source # 
Instance details

Defined in Calamity.HTTP.Channel

Show ChannelMessagesFilter Source # 
Instance details

Defined in Calamity.HTTP.Channel

CalamityToJSON' ChannelMessagesFilter Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ An_AffineTraversal, a ~ Snowflake Message, b ~ Snowflake Message) => LabelOptic "after" k ChannelMessagesFilter ChannelMessagesFilter a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ An_AffineTraversal, a ~ Snowflake Message, b ~ Snowflake Message) => LabelOptic "around" k ChannelMessagesFilter ChannelMessagesFilter a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ An_AffineTraversal, a ~ Snowflake Message, b ~ Snowflake Message) => LabelOptic "before" k ChannelMessagesFilter ChannelMessagesFilter a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

data CreateChannelInviteOptions Source #

Instances

Instances details
ToJSON CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Show CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

CalamityToJSON' CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

Default CreateChannelInviteOptions Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "maxAge" k CreateChannelInviteOptions CreateChannelInviteOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Int, b ~ Maybe Int) => LabelOptic "maxUses" k CreateChannelInviteOptions CreateChannelInviteOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Bool, b ~ Maybe Bool) => LabelOptic "temporary" k CreateChannelInviteOptions CreateChannelInviteOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel

(k ~ A_Lens, a ~ Maybe Bool, b ~ Maybe Bool) => LabelOptic "unique" k CreateChannelInviteOptions CreateChannelInviteOptions a b Source # 
Instance details

Defined in Calamity.HTTP.Channel