discord-haskell-1.17.1: Write bots for Discord in Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Discord.Internal.Rest.Webhook

Description

Provides actions for Webhook API interactions

Synopsis

Documentation

data CreateWebhookOpts Source #

Options for CreateWebhook

Instances

Instances details
ToJSON CreateWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Read CreateWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Show CreateWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Eq CreateWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Ord CreateWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

data ExecuteWebhookWithTokenOpts Source #

Options for ExecuteWebhookWithToken

Instances

Instances details
ToJSON ExecuteWebhookWithTokenOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Read ExecuteWebhookWithTokenOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Show ExecuteWebhookWithTokenOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Eq ExecuteWebhookWithTokenOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Ord ExecuteWebhookWithTokenOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

data ModifyWebhookOpts Source #

Options for ModifyWebhook and ModifyWebhookWithToken

Instances

Instances details
ToJSON ModifyWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Read ModifyWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Show ModifyWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Eq ModifyWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

Ord ModifyWebhookOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook

data WebhookRequest a where Source #

Data constructors for webhook requests.

Constructors

CreateWebhook :: ChannelId -> CreateWebhookOpts -> WebhookRequest Webhook

Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. An error will be returned if a webhook name (name) is not valid. A webhook name is valid if:

  • It does not contain the substring clyde (case-insensitive)
  • It follows the nickname guidelines in the Usernames and Nicknames documentation, with an exception that webhook names can be up to 80 characters
GetChannelWebhooks :: ChannelId -> WebhookRequest [Webhook]

Returns a channel's Webhooks as a list. Requires the MANAGE_WEBHOOKS permission.

GetGuildWebhooks :: GuildId -> WebhookRequest [Webhook]

Returns a guild's Webhooks as a list. Requires the MANAGE_WEBHOOKS permission.

GetWebhook :: WebhookId -> Maybe WebhookToken -> WebhookRequest Webhook

Returns the Webhook for the given id. If a token is given, authentication is not required.

ModifyWebhook :: WebhookId -> Maybe WebhookToken -> ModifyWebhookOpts -> WebhookRequest Webhook

Modify a webhook. Requires the MANAGE_WEBHOOKS permission. Returns the updated Webhook on success. If a token is given, authentication is not required.

DeleteWebhook :: WebhookId -> Maybe WebhookToken -> WebhookRequest ()

Delete a webhook permanently. Requires the MANAGE_WEBHOOKS permission. If a token is given, authentication is not required.

ExecuteWebhook :: WebhookId -> WebhookToken -> ExecuteWebhookWithTokenOpts -> WebhookRequest ()

Executes a Webhook.

Refer to Uploading Files for details on attachments and multipart/form-data requests.

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

Instances details
Request (WebhookRequest a) Source # 
Instance details

Defined in Discord.Internal.Rest.Webhook