Class WebhookHelpers
Http methods for Webhook class.
public static class WebhookHelpers
- Inheritance
-
objectWebhookHelpers
Methods
DeleteAsync(Webhook)
Delete webhook using the webhook token.
public static Task DeleteAsync(this Webhook webhook)
Parameters
webhookWebhook
Returns
DeleteMessageAsync(Webhook, Message)
Delete a webhook message using the webhook token.
public static Task DeleteMessageAsync(this Webhook webhook, Message message)
Parameters
Returns
DeleteMessageAsync(Webhook, ulong)
Delete a webhook message using the webhook token.
public static Task DeleteMessageAsync(this Webhook webhook, ulong messageId)
Parameters
Returns
EditMessageAsync(Webhook, Message, string?, List<EmbedRequest>?, MessageReferenceRequest?, AllowedMentionsRequest?, MessageFlag, string?, ulong?, List<ulong>?, List<AttachmentRequest>?)
Modify a webhook message using the webhook token.
public static Task<Message> EditMessageAsync(this Webhook webhook, Message message, string? content = null, List<EmbedRequest>? embeds = null, MessageReferenceRequest? reference = null, AllowedMentionsRequest? allowedMentions = null, MessageFlag flags = MessageFlag.None, string? nonce = null, ulong? favoriteMediaId = null, List<ulong>? stickerIds = null, List<AttachmentRequest>? attachments = null)
Parameters
webhookWebhookmessageMessagecontentstringembedsList<EmbedRequest>referenceMessageReferenceRequestallowedMentionsAllowedMentionsRequestflagsMessageFlagnoncestringfavoriteMediaIdulong?stickerIdsList<ulong>attachmentsList<AttachmentRequest>
Returns
EditMessageAsync(Webhook, ulong, string?, List<EmbedRequest>?, MessageReferenceRequest?, AllowedMentionsRequest?, MessageFlag, string?, ulong?, List<ulong>?, List<AttachmentRequest>?)
Modify a webhook message using the webhook token.
public static Task<Message> EditMessageAsync(this Webhook webhook, ulong messageId, string? content = null, List<EmbedRequest>? embeds = null, MessageReferenceRequest? reference = null, AllowedMentionsRequest? allowedMentions = null, MessageFlag flags = MessageFlag.None, string? nonce = null, ulong? favoriteMediaId = null, List<ulong>? stickerIds = null, List<AttachmentRequest>? attachments = null)
Parameters
webhookWebhookmessageIdulongcontentstringembedsList<EmbedRequest>referenceMessageReferenceRequestallowedMentionsAllowedMentionsRequestflagsMessageFlagnoncestringfavoriteMediaIdulong?stickerIdsList<ulong>attachmentsList<AttachmentRequest>
Returns
ModifyAsync(Webhook, WebhookJson)
Update webhook using the webhook token.
public static Task<Webhook> ModifyAsync(this Webhook webhook, WebhookJson request)
Parameters
webhookWebhookrequestWebhookJson
Returns
SendMessageAsync(Webhook, string?, List<EmbedRequest>?, string?, string?, MessageReferenceRequest?, AllowedMentionsRequest?, MessageFlag, string?, ulong?, bool?, List<ulong>?, List<AttachmentRequest>?)
Send message using the webhook token in a guild channel.
public static Task SendMessageAsync(this Webhook webhook, string? content = null, List<EmbedRequest>? embeds = null, string? username = null, string? avatarUrl = null, MessageReferenceRequest? reference = null, AllowedMentionsRequest? allowedMentions = null, MessageFlag flags = MessageFlag.None, string? nonce = null, ulong? favoriteMediaId = null, bool? tts = null, List<ulong>? stickerIds = null, List<AttachmentRequest>? attachments = null)
Parameters
webhookWebhookcontentstringembedsList<EmbedRequest>usernamestringavatarUrlstringreferenceMessageReferenceRequestallowedMentionsAllowedMentionsRequestflagsMessageFlagnoncestringfavoriteMediaIdulong?ttsbool?stickerIdsList<ulong>attachmentsList<AttachmentRequest>
Returns
SendMessageWaitAsync(Webhook, string?, List<EmbedRequest>?, string?, string?, MessageReferenceRequest?, AllowedMentionsRequest?, MessageFlag, string?, ulong?, bool?, List<ulong>?, List<AttachmentRequest>?)
Send message using the webhook token in a guild channel and wait for response message.
public static Task<Message> SendMessageWaitAsync(this Webhook webhook, string? content = null, List<EmbedRequest>? embeds = null, string? username = null, string? avatarUrl = null, MessageReferenceRequest? reference = null, AllowedMentionsRequest? allowedMentions = null, MessageFlag flags = MessageFlag.None, string? nonce = null, ulong? favoriteMediaId = null, bool? tts = null, List<ulong>? stickerIds = null, List<AttachmentRequest>? attachments = null)
Parameters
webhookWebhookcontentstringembedsList<EmbedRequest>usernamestringavatarUrlstringreferenceMessageReferenceRequestallowedMentionsAllowedMentionsRequestflagsMessageFlagnoncestringfavoriteMediaIdulong?ttsbool?stickerIdsList<ulong>attachmentsList<AttachmentRequest>