Class WebhookOptions
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
ChannelId
The new channel ID to move the webhook to.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("channel_id")]
public ulong? ChannelId { get; set; }
Property Value
Name
The default name of the webhook.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string? Name { get; set; }
Property Value
Remarks
A webhook name is valid if:
- The string length is between 1 and 80 characters.
-
It does not contain the substrings
clydeordiscord(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
avatarImageProperties?
Returns
WithChannelId(ulong?)
The new channel ID to move the webhook to.
public WebhookOptions WithChannelId(ulong? channelId)
Parameters
channelIdulong?
Returns
WithName(string?)
The default name of the webhook.
public WebhookOptions WithName(string? name)
Parameters
namestring
Returns
Remarks
A webhook name is valid if:
- The string length is between 1 and 80 characters.
-
It does not contain the substrings
clydeordiscord(case-insensitive). - It follows Discord's nickname guidelines, found here.