Discore
Show / Hide Table of Contents

Method ModifyWebhook

| Improve this Doc View Source

ModifyWebhook(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
| Improve this Doc View Source

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
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX