Table of Contents

Class WebhookHelpers

Namespace
Fluxer.Net
Assembly
Fluxer.Net.dll

Http methods for Webhook class.

public static class WebhookHelpers
Inheritance
object
WebhookHelpers

Methods

DeleteAsync(Webhook)

Delete webhook using the webhook token.

public static Task DeleteAsync(this Webhook webhook)

Parameters

webhook Webhook

Returns

Task

DeleteMessageAsync(Webhook, Message)

Delete a webhook message using the webhook token.

public static Task DeleteMessageAsync(this Webhook webhook, Message message)

Parameters

webhook Webhook
message Message

Returns

Task

DeleteMessageAsync(Webhook, ulong)

Delete a webhook message using the webhook token.

public static Task DeleteMessageAsync(this Webhook webhook, ulong messageId)

Parameters

webhook Webhook
messageId ulong

Returns

Task

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

webhook Webhook
message Message
content string
embeds List<EmbedRequest>
reference MessageReferenceRequest
allowedMentions AllowedMentionsRequest
flags MessageFlag
nonce string
favoriteMediaId ulong?
stickerIds List<ulong>
attachments List<AttachmentRequest>

Returns

Task<Message>

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

webhook Webhook
messageId ulong
content string
embeds List<EmbedRequest>
reference MessageReferenceRequest
allowedMentions AllowedMentionsRequest
flags MessageFlag
nonce string
favoriteMediaId ulong?
stickerIds List<ulong>
attachments List<AttachmentRequest>

Returns

Task<Message>

ModifyAsync(Webhook, WebhookJson)

Update webhook using the webhook token.

public static Task<Webhook> ModifyAsync(this Webhook webhook, WebhookJson request)

Parameters

webhook Webhook
request WebhookJson

Returns

Task<Webhook>

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

webhook Webhook
content string
embeds List<EmbedRequest>
username string
avatarUrl string
reference MessageReferenceRequest
allowedMentions AllowedMentionsRequest
flags MessageFlag
nonce string
favoriteMediaId ulong?
tts bool?
stickerIds List<ulong>
attachments List<AttachmentRequest>

Returns

Task

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

webhook Webhook
content string
embeds List<EmbedRequest>
username string
avatarUrl string
reference MessageReferenceRequest
allowedMentions AllowedMentionsRequest
flags MessageFlag
nonce string
favoriteMediaId ulong?
tts bool?
stickerIds List<ulong>
attachments List<AttachmentRequest>

Returns

Task<Message>