Table of Contents

Class WebhookMessageProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class WebhookMessageProperties : IHttpSerializable, IMessageProperties
Inheritance
WebhookMessageProperties
Implements
Inherited Members

Constructors

WebhookMessageProperties()

public WebhookMessageProperties()

Properties

AllowedMentions

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("allowed_mentions")]
public AllowedMentionsProperties? AllowedMentions { get; set; }

Property Value

AllowedMentionsProperties

AppliedTags

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("applied_tags")]
public IEnumerable<ulong>? AppliedTags { get; set; }

Property Value

IEnumerable<ulong>

Attachments

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonConverter(typeof(AttachmentPropertiesIEnumerableConverter))]
[JsonPropertyName("attachments")]
public IEnumerable<AttachmentProperties>? Attachments { get; set; }

Property Value

IEnumerable<AttachmentProperties>

AvatarUrl

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("avatar_url")]
public string? AvatarUrl { get; set; }

Property Value

string

Components

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("components")]
public IEnumerable<ComponentProperties>? Components { get; set; }

Property Value

IEnumerable<ComponentProperties>

Content

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("content")]
public string? Content { get; set; }

Property Value

string

Embeds

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("embeds")]
public IEnumerable<EmbedProperties>? Embeds { get; set; }

Property Value

IEnumerable<EmbedProperties>

Flags

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("flags")]
public MessageFlags? Flags { get; set; }

Property Value

MessageFlags?

Poll

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("poll")]
public MessagePollProperties? Poll { get; set; }

Property Value

MessagePollProperties

ThreadName

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("thread_name")]
public string? ThreadName { get; set; }

Property Value

string

Tts

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("tts")]
public bool Tts { get; set; }

Property Value

bool

Username

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("username")]
public string? Username { get; set; }

Property Value

string

Methods

AddAppliedTags(IEnumerable<ulong>)

public WebhookMessageProperties AddAppliedTags(IEnumerable<ulong> appliedTags)

Parameters

appliedTags IEnumerable<ulong>

Returns

WebhookMessageProperties

AddAppliedTags(params ulong[])

public WebhookMessageProperties AddAppliedTags(params ulong[] appliedTags)

Parameters

appliedTags ulong[]

Returns

WebhookMessageProperties

AddAttachments(params AttachmentProperties[])

public WebhookMessageProperties AddAttachments(params AttachmentProperties[] attachments)

Parameters

attachments AttachmentProperties[]

Returns

WebhookMessageProperties

AddAttachments(IEnumerable<AttachmentProperties>)

public WebhookMessageProperties AddAttachments(IEnumerable<AttachmentProperties> attachments)

Parameters

attachments IEnumerable<AttachmentProperties>

Returns

WebhookMessageProperties

AddComponents(params ComponentProperties[])

public WebhookMessageProperties AddComponents(params ComponentProperties[] components)

Parameters

components ComponentProperties[]

Returns

WebhookMessageProperties

AddComponents(IEnumerable<ComponentProperties>)

public WebhookMessageProperties AddComponents(IEnumerable<ComponentProperties> components)

Parameters

components IEnumerable<ComponentProperties>

Returns

WebhookMessageProperties

AddEmbeds(params EmbedProperties[])

public WebhookMessageProperties AddEmbeds(params EmbedProperties[] embeds)

Parameters

embeds EmbedProperties[]

Returns

WebhookMessageProperties

AddEmbeds(IEnumerable<EmbedProperties>)

public WebhookMessageProperties AddEmbeds(IEnumerable<EmbedProperties> embeds)

Parameters

embeds IEnumerable<EmbedProperties>

Returns

WebhookMessageProperties

Serialize()

Serializes the object or its part into HttpContent.

public HttpContent Serialize()

Returns

HttpContent

WithAllowedMentions(AllowedMentionsProperties?)

public WebhookMessageProperties WithAllowedMentions(AllowedMentionsProperties? allowedMentions)

Parameters

allowedMentions AllowedMentionsProperties

Returns

WebhookMessageProperties

WithAppliedTags(IEnumerable<ulong>?)

public WebhookMessageProperties WithAppliedTags(IEnumerable<ulong>? appliedTags)

Parameters

appliedTags IEnumerable<ulong>

Returns

WebhookMessageProperties

WithAttachments(IEnumerable<AttachmentProperties>?)

public WebhookMessageProperties WithAttachments(IEnumerable<AttachmentProperties>? attachments)

Parameters

attachments IEnumerable<AttachmentProperties>

Returns

WebhookMessageProperties

WithAvatarUrl(string?)

public WebhookMessageProperties WithAvatarUrl(string? avatarUrl)

Parameters

avatarUrl string

Returns

WebhookMessageProperties

WithComponents(IEnumerable<ComponentProperties>?)

public WebhookMessageProperties WithComponents(IEnumerable<ComponentProperties>? components)

Parameters

components IEnumerable<ComponentProperties>

Returns

WebhookMessageProperties

WithContent(string?)

public WebhookMessageProperties WithContent(string? content)

Parameters

content string

Returns

WebhookMessageProperties

WithEmbeds(IEnumerable<EmbedProperties>?)

public WebhookMessageProperties WithEmbeds(IEnumerable<EmbedProperties>? embeds)

Parameters

embeds IEnumerable<EmbedProperties>

Returns

WebhookMessageProperties

WithFlags(MessageFlags?)

public WebhookMessageProperties WithFlags(MessageFlags? flags)

Parameters

flags MessageFlags?

Returns

WebhookMessageProperties

WithPoll(MessagePollProperties?)

public WebhookMessageProperties WithPoll(MessagePollProperties? poll)

Parameters

poll MessagePollProperties

Returns

WebhookMessageProperties

WithThreadName(string?)

public WebhookMessageProperties WithThreadName(string? threadName)

Parameters

threadName string

Returns

WebhookMessageProperties

WithTts(bool)

public WebhookMessageProperties WithTts(bool tts = true)

Parameters

tts bool

Returns

WebhookMessageProperties

WithUsername(string?)

public WebhookMessageProperties WithUsername(string? username)

Parameters

username string

Returns

WebhookMessageProperties

Operators

implicit operator WebhookMessageProperties(string)

public static implicit operator WebhookMessageProperties(string content)

Parameters

content string

Returns

WebhookMessageProperties