Discore
Show / Hide Table of Contents

Method CreateWebhook

| Improve this Doc View Source

CreateWebhook(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 name or avatar is null.

DiscordHttpApiException
| Improve this Doc View Source

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 channel, name, or avatar is null.

DiscordHttpApiException
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX