Table of Contents

Class WebhookOptions

Namespace
NetCord.Rest
Assembly
NetCord.dll

Represents a modification to perform on a Webhook object.

public class WebhookOptions
Inheritance
WebhookOptions
Inherited Members

Properties

Avatar

The ImageProperties for the default webhook avatar.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("avatar")]
public ImageProperties? Avatar { get; set; }

Property Value

ImageProperties?

ChannelId

The new channel ID to move the webhook to.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("channel_id")]
public ulong? ChannelId { get; set; }

Property Value

ulong?

Name

The default name of the webhook.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string? Name { get; set; }

Property Value

string

Remarks

A webhook name is valid if:

  • The string length is between 1 and 80 characters.
  • It does not contain the substrings clyde or discord (case-insensitive).
  • It follows Discord's nickname guidelines, found here.

Methods

WithAvatar(ImageProperties?)

The ImageProperties for the default webhook avatar.

public WebhookOptions WithAvatar(ImageProperties? avatar)

Parameters

avatar ImageProperties?

Returns

WebhookOptions

WithChannelId(ulong?)

The new channel ID to move the webhook to.

public WebhookOptions WithChannelId(ulong? channelId)

Parameters

channelId ulong?

Returns

WebhookOptions

WithName(string?)

The default name of the webhook.

public WebhookOptions WithName(string? name)

Parameters

name string

Returns

WebhookOptions

Remarks

A webhook name is valid if:

  • The string length is between 1 and 80 characters.
  • It does not contain the substrings clyde or discord (case-insensitive).
  • It follows Discord's nickname guidelines, found here.