Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Provides actions for Webhook API interactions
Synopsis
- data CreateWebhookOpts = CreateWebhookOpts {}
- data ExecuteWebhookWithTokenOpts = ExecuteWebhookWithTokenOpts {}
- data ModifyWebhookOpts = ModifyWebhookOpts {}
- data WebhookContent
- data WebhookRequest a where
- CreateWebhook :: ChannelId -> CreateWebhookOpts -> WebhookRequest Webhook
- GetChannelWebhooks :: ChannelId -> WebhookRequest [Webhook]
- GetGuildWebhooks :: GuildId -> WebhookRequest [Webhook]
- GetWebhook :: WebhookId -> Maybe WebhookToken -> WebhookRequest Webhook
- ModifyWebhook :: WebhookId -> Maybe WebhookToken -> ModifyWebhookOpts -> WebhookRequest Webhook
- DeleteWebhook :: WebhookId -> Maybe WebhookToken -> WebhookRequest ()
- ExecuteWebhook :: WebhookId -> WebhookToken -> ExecuteWebhookWithTokenOpts -> WebhookRequest ()
- GetWebhookMessage :: WebhookId -> WebhookToken -> MessageId -> WebhookRequest Message
- EditWebhookMessage :: WebhookId -> WebhookToken -> MessageId -> Text -> WebhookRequest Message
- DeleteWebhookMessage :: WebhookId -> WebhookToken -> MessageId -> WebhookRequest ()
Documentation
data CreateWebhookOpts Source #
Options for CreateWebhook
Instances
data ExecuteWebhookWithTokenOpts Source #
Options for ExecuteWebhookWithToken
Instances
data ModifyWebhookOpts Source #
Options for ModifyWebhook
and ModifyWebhookWithToken
Instances
data WebhookContent Source #
A webhook's content
Instances
Read WebhookContent Source # | |
Defined in Discord.Internal.Rest.Webhook readsPrec :: Int -> ReadS WebhookContent # readList :: ReadS [WebhookContent] # | |
Show WebhookContent Source # | |
Defined in Discord.Internal.Rest.Webhook showsPrec :: Int -> WebhookContent -> ShowS # show :: WebhookContent -> String # showList :: [WebhookContent] -> ShowS # | |
Eq WebhookContent Source # | |
Defined in Discord.Internal.Rest.Webhook (==) :: WebhookContent -> WebhookContent -> Bool # (/=) :: WebhookContent -> WebhookContent -> Bool # | |
Ord WebhookContent Source # | |
Defined in Discord.Internal.Rest.Webhook compare :: WebhookContent -> WebhookContent -> Ordering # (<) :: WebhookContent -> WebhookContent -> Bool # (<=) :: WebhookContent -> WebhookContent -> Bool # (>) :: WebhookContent -> WebhookContent -> Bool # (>=) :: WebhookContent -> WebhookContent -> Bool # max :: WebhookContent -> WebhookContent -> WebhookContent # min :: WebhookContent -> WebhookContent -> WebhookContent # |
data WebhookRequest a where Source #
Data constructors for webhook requests.
CreateWebhook :: ChannelId -> CreateWebhookOpts -> WebhookRequest Webhook | Creates a new webhook and returns a webhook object on success. Requires the
|
GetChannelWebhooks :: ChannelId -> WebhookRequest [Webhook] | Returns a channel's |
GetGuildWebhooks :: GuildId -> WebhookRequest [Webhook] | Returns a guild's |
GetWebhook :: WebhookId -> Maybe WebhookToken -> WebhookRequest Webhook | Returns the |
ModifyWebhook :: WebhookId -> Maybe WebhookToken -> ModifyWebhookOpts -> WebhookRequest Webhook | Modify a webhook. Requires the |
DeleteWebhook :: WebhookId -> Maybe WebhookToken -> WebhookRequest () | Delete a webhook permanently. Requires the |
ExecuteWebhook :: WebhookId -> WebhookToken -> ExecuteWebhookWithTokenOpts -> WebhookRequest () | Executes a Webhook. Refer to Uploading Files
for details on attachments and |
GetWebhookMessage :: WebhookId -> WebhookToken -> MessageId -> WebhookRequest Message | Returns a previously-sent webhook message from the same token. |
EditWebhookMessage :: WebhookId -> WebhookToken -> MessageId -> Text -> WebhookRequest Message | Edits a previously-sent webhook message from the same token. |
DeleteWebhookMessage :: WebhookId -> WebhookToken -> MessageId -> WebhookRequest () | Deletes a previously-sent webhook message from the same token. |
Instances
Request (WebhookRequest a) Source # | |
Defined in Discord.Internal.Rest.Webhook majorRoute :: WebhookRequest a -> String Source # jsonRequest :: WebhookRequest a -> JsonRequest Source # |