Method ModifyWebhook
| Improve this Doc View SourceModifyWebhook(Snowflake, string?, DiscordImageData?, Snowflake?)
Modifies an existing webhook.
Requires ManageWebhooks.
Declaration
public Task<DiscordWebhook> ModifyWebhook(Snowflake webhookId, string? name = null, DiscordImageData? avatar = null, Snowflake? channelId = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Snowflake | webhookId | |
| string | name | |
| DiscordImageData | avatar | |
| Snowflake? | channelId | The ID of the text channel to move the webhook to (or null to not move). |
Returns
| Type | Description |
|---|---|
| Task<DiscordWebhook> |
Exceptions
| Type | Condition |
|---|---|
| DiscordHttpApiException |
ModifyWebhook(DiscordWebhook, string?, DiscordImageData?, ITextChannel?)
Modifies an existing webhook.
Requires ManageWebhooks.
Declaration
public Task<DiscordWebhook> ModifyWebhook(DiscordWebhook webhook, string? name = null, DiscordImageData? avatar = null, ITextChannel? channel = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DiscordWebhook | webhook | |
| string | name | |
| DiscordImageData | avatar | |
| ITextChannel | channel | The text channel to move the webhook to (or null to not move). |
Returns
| Type | Description |
|---|---|
| Task<DiscordWebhook> |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | |
| DiscordHttpApiException |