Method CreateWebhook
| Improve this Doc View SourceCreateWebhook(string, DiscordImageData, Snowflake)
Creates a webhook.
Requires ManageWebhooks.
Declaration
public Task<DiscordWebhook> CreateWebhook(string name, DiscordImageData avatar, Snowflake channelId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| DiscordImageData | avatar | |
| Snowflake | channelId | The ID of the channel the webhook will post to. |
Returns
| Type | Description |
|---|---|
| Task<DiscordWebhook> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| DiscordHttpApiException |
CreateWebhook(string, DiscordImageData, ITextChannel)
Creates a webhook.
Requires ManageWebhooks.
Declaration
public Task<DiscordWebhook> CreateWebhook(string name, DiscordImageData avatar, ITextChannel channel)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| DiscordImageData | avatar | |
| ITextChannel | channel | The channel the webhook will post to. |
Returns
| Type | Description |
|---|---|
| Task<DiscordWebhook> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| DiscordHttpApiException |