Table of Contents

Class FluxerWebhookClient

Namespace
Fluxer.Net
Assembly
Fluxer.Net.dll

Webhook client for Fluxer.

public class FluxerWebhookClient : FluxerBaseClient
Inheritance
object
FluxerWebhookClient
Inherited Members

Constructors

FluxerWebhookClient(string, FluxerConfig?)

Create a Webhook client with url to send webhook messages.

public FluxerWebhookClient(string webhookUrl, FluxerConfig? config = null)

Parameters

webhookUrl string
config FluxerConfig

Exceptions

ArgumentNullException
ArgumentException

Properties

Id

Webhook id.

public ulong Id { get; }

Property Value

ulong

Token

Webhook token.

public string Token { get; }

Property Value

string

Methods

DeleteAsync()

Delete webhook using the webhook token.

public Task DeleteAsync()

Returns

Task

DeleteMessageAsync(ulong)

Delete a webhook message using the webhook token.

public Task DeleteMessageAsync(ulong messageId)

Parameters

messageId ulong

Returns

Task

EditMessageAsync(ulong, string?, List<EmbedRequest>?, MessageReferenceRequest?, AllowedMentionsRequest?, MessageFlag, string?, ulong?, List<ulong>?, List<AttachmentRequest>?)

Modify a webhook message using the webhook token.

public Task<Message> EditMessageAsync(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

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>

GetAsync()

Get webhook using the webhook token.

public Task<Webhook> GetAsync()

Returns

Task<Webhook>

SendMessageAsync(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 Task SendMessageAsync(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

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(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 Task<Message> SendMessageWaitAsync(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

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>