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
ulongThe ID of the webhook to add.
token
stringThe 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
UriURL 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
ulongID of the webhook to register.
client
BaseDiscordClientDiscord client to which the webhook will belong.
Returns
- Task<DiscordWebhook>
The registered webhook.