Table of Contents

Class DiscordWebhookClient

Namespace
DSharpPlus
Assembly
DSharpPlus.dll

Represents a webhook-only client. This client can be used to execute Discord webhooks.

public class DiscordWebhookClient
Inheritance
DiscordWebhookClient

Constructors

DiscordWebhookClient()

Creates a new webhook client.

DiscordWebhookClient(IWebProxy, TimeSpan?, ILoggerFactory, LogLevel, string)

Creates a new webhook client, with specified HTTP proxy, timeout, and logging settings.

Properties

AvatarUrl

Gets or set the avatar override for registered webhooks. Note that this only takes effect when broadcasting.

Logger

Gets the logger for this client.

Username

Gets or sets the username override for registered webhooks. Note that this only takes effect when broadcasting.

Webhooks

Gets the collection of registered webhooks.

Methods

AddWebhook(DiscordWebhook)

Registers a webhook with this client. This reuses the supplied webhook object.

AddWebhookAsync(ulong, BaseDiscordClient)

Registers a webhook with this client. This retrieves a webhook using the supplied full discord client.

AddWebhookAsync(ulong, string)

Registers a webhook with this client. This retrieves a webhook based on the ID and token supplied.

AddWebhookAsync(Uri)

Registers a webhook with this client. This retrieves a webhook from webhook URL.

BroadcastMessageAsync(DiscordWebhookBuilder)

Broadcasts a message to all registered webhooks.

~DiscordWebhookClient()
GetRegisteredWebhook(ulong)

Gets a registered webhook with specified ID.

GetRequestMetrics(bool)

Gets the request metrics, optionally since the last time they were checked.

RemoveWebhook(ulong)

Unregisters a webhook with this client.