Table of Contents

Method AddWebhookAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.dll

AddWebhookAsync(ulong, string)

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

public Task<DiscordWebhook> AddWebhookAsync(ulong id, string token)

Parameters

id ulong

The ID of the webhook to add.

token string

The token of the webhook to add.

Returns

Task<DiscordWebhook>

The registered webhook.

AddWebhookAsync(Uri)

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

public Task<DiscordWebhook> AddWebhookAsync(Uri url)

Parameters

url Uri

URL of the webhook to retrieve. This URL must contain both ID and token.

Returns

Task<DiscordWebhook>

The registered webhook.

AddWebhookAsync(ulong, BaseDiscordClient)

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

public Task<DiscordWebhook> AddWebhookAsync(ulong id, BaseDiscordClient client)

Parameters

id ulong

ID of the webhook to register.

client BaseDiscordClient

Discord client to which the webhook will belong.

Returns

Task<DiscordWebhook>

The registered webhook.